rice.selector
Class ProfileSelector
java.lang.Object
java.lang.Thread
rice.selector.SelectorManager
rice.selector.ProfileSelector
- All Implemented Interfaces:
- Runnable, Destructable, Timer
public class ProfileSelector
- extends SelectorManager
- Author:
- jeffh
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
| Fields inherited from class rice.selector.SelectorManager |
cancelledKeys, environment, instance, invocations, logger, modifyKeys, random, running, select, selector, seqCtr, seqLock, TIMEOUT, timerQueue, timeSource, useLoopListeners, wakeupTime |
| Methods inherited from class rice.selector.SelectorManager |
addLoopObserver, addTask, cancel, destroy, executeDueTasks, getEnvironment, getInvocation, getKey, getModifyKey, getNextTaskExecutionTime, getNumInvocations, getSelector, getTimer, isSelectorThread, main, modifyKey, notifyLoopListeners, register, removeLoopObserver, removeTask, run, schedule, schedule, schedule, scheduleAtFixedRate, select, selectedKeys, setEnvironment, setLogLevel, setSelect, useLoopListeners, wakeup |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
useHeartbeat
public static boolean useHeartbeat
recordStats
public static boolean recordStats
lastTaskType
public String lastTaskType
lastTaskClass
public String lastTaskClass
lastTaskToString
public String lastTaskToString
lastTaskHash
public long lastTaskHash
ProfileSelector
public ProfileSelector(String instance,
TimeSource timeSource,
LogManager log)
ProfileSelector
public ProfileSelector(String instance,
TimeSource timeSource,
LogManager log,
RandomSource rand)
ProfileSelector
public ProfileSelector(String instance,
TimeSource timeSource,
LogManager log,
RandomSource rand,
int lastTaskTime)
onLoop
protected void onLoop()
- Description copied from class:
SelectorManager
- This method is to be implemented by a subclass to do some task each loop.
- Overrides:
onLoop in class SelectorManager
invoke
public void invoke(Runnable d)
- Description copied from class:
SelectorManager
- This method schedules a runnable task to be done by the selector thread
during the next select() call. All operations which modify the selector
should be done using this method, as they must be done in the selector
thread.
- Overrides:
invoke in class SelectorManager
- Parameters:
d - The runnable task to invoke
addStat
public void addStat(String s,
long time)
printStats
public void printStats()
executeTask
protected boolean executeTask(TimerTask next)
- Overrides:
executeTask in class SelectorManager
doSelections
protected void doSelections()
throws IOException
- Overrides:
doSelections in class SelectorManager
- Throws:
IOException
doInvocations
protected void doInvocations()
- Method which invokes all pending invocations. This method should *only* be
called by the selector thread.
- Overrides:
doInvocations in class SelectorManager
doInvocations2
protected void doInvocations2()
Copyright © 2010. All Rights Reserved.