public class TimerFactoryImpl extends TimerGroupImpl implements TimerFactory
Modifier and Type | Class and Description |
---|---|
static class |
TimerFactoryImpl.TracingEventHandler |
Constructor and Description |
---|
TimerFactoryImpl(ObjectRegistrationManager orm,
java.lang.String name,
java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Timer> |
activeSet()
Returns a read-only view of the set of Controllables that are
currently active.
|
java.util.Set<? extends Controllable> |
enabledSet()
Returns a read-only view of the set of enabled Controllables.
|
Controllable |
getControllable(int id)
Returns the Controllable corresponding to id, for
id in the range 0 (inclusive) to numberOfIds() (exclusive).
|
TimerEventController |
makeController(java.lang.String name)
Create a TimerController, which can create TimerEvents and
send them to registered TimerEventHandlers.
|
LogEventHandler |
makeLogEventHandler(java.lang.String name)
Create a new LogEventHandler.
|
StatsEventHandler |
makeMultiThreadedStatsEventHandler(java.lang.String name)
Create a new StatsEventHandler.
|
StatsEventHandler |
makeStatsEventHandler(java.lang.String name)
Create a new StatsEventHandler.
|
Timer |
makeTimer(java.lang.String name,
java.lang.String description)
Create a new Timer.
|
TimerGroup |
makeTimerGroup(java.lang.String name,
java.lang.String description)
Create a new TimerGroup.
|
TimerEventHandler |
makeTracingEventHandler(java.lang.String name) |
int |
numberOfIds()
Returns the maximum id used by this TimerFactory for creating Controllables.
|
void |
removeController(TimerEventControllerBase controller)
Remove the controller from this factory.
|
void |
removeTimerEventHandler(TimerEventHandler handler)
Remove the handler from this TimerFactory.
|
void |
saveTimerEventController(TimerEventControllerBase tec) |
boolean |
timerAlreadyExists(java.lang.String name)
Return true iff a timer with the given name already exists.
|
java.util.Map<java.lang.String,TimerGroupImpl> |
timerGroups()
Returns a read-only map from TimerGroup names to TimerGroups.
|
java.util.Map<java.lang.String,TimerImpl> |
timers()
Returns a read-only map from Timer names to Timers.
|
add, contents, remove
description, disable, enable, id, isEnabled
factory
equals, hashCode, name, setFactory, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, remove
contents, description, disable, enable, id, isEnabled
public TimerFactoryImpl(ObjectRegistrationManager orm, java.lang.String name, java.lang.String description)
public int numberOfIds()
TimerFactory
numberOfIds
in interface TimerFactory
public Controllable getControllable(int id)
TimerFactory
getControllable
in interface TimerFactory
public TimerEventHandler makeTracingEventHandler(java.lang.String name)
makeTracingEventHandler
in interface TimerFactory
public LogEventHandler makeLogEventHandler(java.lang.String name)
TimerFactory
makeLogEventHandler
in interface TimerFactory
public StatsEventHandler makeStatsEventHandler(java.lang.String name)
TimerFactory
makeStatsEventHandler
in interface TimerFactory
public StatsEventHandler makeMultiThreadedStatsEventHandler(java.lang.String name)
TimerFactory
makeMultiThreadedStatsEventHandler
in interface TimerFactory
public void removeTimerEventHandler(TimerEventHandler handler)
TimerFactory
removeTimerEventHandler
in interface TimerFactory
public Timer makeTimer(java.lang.String name, java.lang.String description)
TimerFactory
makeTimer
in interface TimerFactory
public java.util.Map<java.lang.String,TimerImpl> timers()
TimerFactory
timers
in interface TimerFactory
public TimerGroup makeTimerGroup(java.lang.String name, java.lang.String description)
TimerFactory
makeTimerGroup
in interface TimerFactory
public java.util.Map<java.lang.String,TimerGroupImpl> timerGroups()
TimerFactory
timerGroups
in interface TimerFactory
public void saveTimerEventController(TimerEventControllerBase tec)
public TimerEventController makeController(java.lang.String name)
TimerFactory
makeController
in interface TimerFactory
public void removeController(TimerEventControllerBase controller)
TimerFactory
removeController
in interface TimerFactory
public java.util.Set<? extends Controllable> enabledSet()
TimerFactory
enabledSet
in interface TimerFactory
public java.util.Set<Timer> activeSet()
TimerFactory
activeSet
in interface TimerFactory
public boolean timerAlreadyExists(java.lang.String name)
TimerFactory
timerAlreadyExists
in interface TimerFactory