|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.e2etrace.timer.DefaultTimerFactory
public class DefaultTimerFactory
Default Factory class for Timer instances.
The factory returns a new Timer instance. In the default configuration, the
new Timer is of the type DefaultTimer
. Please refer
to the documentation of this class to learn about the restrictions of the
underlying implementation.
However, if e2etrace has been compiled and is executed using JDK 5.0 (or
higher), the factory will return instances of the type
ExactTimer
. This Timer implementation uses the
advanced timing features of the new JDK releases and avoids all problems
described in the documentation of DefaultTimer
.
Please note the different constructors of the factory. You can force the factory to create specific types of Timers by using the appropriate constructor. If you use the default constructor, the above described logic applies.
You can use the class PrintTimerAccuracy
to determine
which Timer type will be used by e2etrace on your system and which accuracy
the Timers are able to deliver.
Constructor Summary | |
---|---|
DefaultTimerFactory()
Default constructor. |
|
DefaultTimerFactory(Class timerType)
Constructor using a pre-defined Timer type. |
Method Summary | |
---|---|
Class |
getTimerType()
Returns the type of Timers currently used by the Factory. |
ITimer |
newInstance()
Creates a new timer instance. |
void |
setTimerType(Class timerType)
Changes the type of Timer returned by the Factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTimerFactory()
public DefaultTimerFactory(Class timerType)
timerType
- type of timers the factory will returnMethod Detail |
---|
public ITimer newInstance()
newInstance
in interface ITimerFactory
public void setTimerType(Class timerType)
timerType
- New Timer typepublic Class getTimerType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |