com.threerings.presents.server
Class ReportingInvoker
java.lang.Object
java.lang.Thread
com.samskivert.util.LoopingThread
com.samskivert.util.Invoker
com.threerings.presents.server.ReportingInvoker
- All Implemented Interfaces:
- RunQueue, Runnable, Executor
- Direct Known Subclasses:
- PresentsAuthInvoker, PresentsInvoker
public class ReportingInvoker
- extends Invoker
Extends invoker with a reporter implementation that shows current queue status, maximum
historical size and the results of unit profiling if enabled.
| Fields inherited from interface com.samskivert.util.RunQueue |
AWT |
| Methods inherited from class com.samskivert.util.Invoker |
execute, getPendingUnits, isDispatchThread, iterate, postRunnable, postUnit, recordMetrics, setDefaultLongThreshold, setProfilingParameters, shutdown, shutdownRequested |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, 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 |
_defrep
protected ReportManager.Reporter _defrep
- Generates a report on our runtime behavior.
_profrep
protected ReportManager.Reporter _profrep
- Generates a report with our profiling data.
_recent
protected ReportingInvoker.Stats _recent
- Used to track runtime statistics.
_current
protected ReportingInvoker.Stats _current
- Used to track runtime statistics.
_totalUnitsRun
protected int _totalUnitsRun
- The total number of units run.
_currentUnit
protected Object _currentUnit
- Records the currently invoking unit.
_currentUnitStart
protected long _currentUnitStart
- The time at which our current unit started.
ReportingInvoker
public ReportingInvoker(String name,
Executor receiver,
ReportManager repmgr)
- Creates a new reporting invoker. The instance will be registered with the report manager
if profiling is enabled (
Invoker.PERF_TRACK).
getStats
public ReportingInvoker.Stats getStats(boolean snapshot)
- Returns a recent snapshot of runtime statistics tracked by the invoker.
- Parameters:
snapshot - if true, the current stats will be snapshotted and reset and the new
snapshot will be returned. If false, the previous snapshot will be returned. If no snapshot
has ever been taken, the current stats that have been accumulting since the JVM start will
be returned.
willInvokeUnit
protected void willInvokeUnit(Invoker.Unit unit,
long start)
- Overrides:
willInvokeUnit in class Invoker
didInvokeUnit
protected void didInvokeUnit(Invoker.Unit unit,
long start)
- Overrides:
didInvokeUnit in class Invoker