public class NullTimerService extends AbstractContexed implements TimerService
TimerService
.
USed in testsconn
Constructor and Description |
---|
NullTimerService(AppContext conn) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
AppContext is being closed. |
java.lang.Class<? super TimerService> |
getType()
Returns the type of service the class should be registered under.
|
void |
startTimer(java.lang.String name)
Start a named timer
|
void |
stopTimer(java.lang.String name)
Stop a named timer
|
void |
timerStats()
Generate timer statistics to the log of the timer service.
|
void |
timerStats(java.lang.Class clazz)
Generate timer statistics to the log of the specified class.
|
void |
timerStats(java.lang.StringBuilder sb)
write stats to a
StringBuilder |
getContext, getLogger, resetLogger
public NullTimerService(AppContext conn)
conn
- public java.lang.Class<? super TimerService> getType()
AppContextService
getType
in interface AppContextService<TimerService>
public void cleanup()
AppContextCleanup
AppContext
is being closed.
Only use this for cleanup that can't be handled by
normal garbage collection or for state which is never returned by reference.cleanup
in interface AppContextCleanup
public void timerStats()
TimerService
timerStats
in interface TimerService
public void timerStats(java.lang.Class clazz)
TimerService
timerStats
in interface TimerService
clazz
- Class for loggingpublic void timerStats(java.lang.StringBuilder sb)
TimerService
StringBuilder
timerStats
in interface TimerService
public void startTimer(java.lang.String name)
TimerService
startTimer
in interface TimerService
public void stopTimer(java.lang.String name)
TimerService
stopTimer
in interface TimerService