public class DefaultTimerService extends AbstractContexed implements TimerService
TimerServiceconn| Constructor and Description |
|---|
DefaultTimerService(AppContext conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
AppContext is being closed. |
void |
closeAll() |
java.lang.String |
getPrefix() |
java.lang.Class<TimerService> |
getType()
Returns the type of service the class should be registered under.
|
void |
setPrefix(java.lang.String prefix) |
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, resetLoggerpublic DefaultTimerService(AppContext conn)
public void cleanup()
AppContextCleanupAppContext 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 AppContextCleanuppublic void timerStats(java.lang.Class clazz)
TimerServicetimerStats in interface TimerServiceclazz - Class for loggingpublic void timerStats(java.lang.StringBuilder sb)
TimerServiceStringBuildertimerStats in interface TimerServicepublic void closeAll()
public final void startTimer(java.lang.String name)
TimerServicestartTimer in interface TimerServicepublic final void stopTimer(java.lang.String name)
TimerServicestopTimer in interface TimerServicepublic java.lang.Class<TimerService> getType()
AppContextServicegetType in interface AppContextService<TimerService>public void timerStats()
TimerServicetimerStats in interface TimerServicepublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
prefix - the prefix to set