|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StopwatchEngine
Interface describes the basic functionality a Stopwatch engine should support. All classes implementing this interface are considered Stopwatch engines. Stopwatch can be configured to use given engine by :
-Dcom.commsen.stopwatch.engine=<fully_qualified_class_name>
JVM
parameterengine=<fully_qualified_class_name>
Method Summary | |
---|---|
long |
begin(java.lang.String group,
java.lang.String label)
Method called when mensuration is started. |
void |
end(long id)
Method called when mensuration is stopped. |
java.util.Properties |
getProperties()
Returns engine properties. |
StopwatchStorage |
getStorage()
Allows clients to get reference to the stopwatch's storage. |
java.lang.String |
getStorageClass()
Method called to obtain the current storage class |
void |
pause()
Called when Stopwatch is disabled or for any other reason it will not use this engine for some time. |
void |
resume()
Called when Stopwatch is enabled and before attepting to use paused engine. |
void |
setDebugEnabled(boolean debugEnabled)
Instructs engine to disable/enable debug information. |
void |
setPersistenceMode(int persistenceMode)
Method called to instruct engine in what mode persistence manager should work in. |
void |
setProperties(java.util.Properties properties)
Called by Stopwatch to set engine properties . |
void |
setStorage(StopwatchStorage storage)
Method called to instruct engine to use user defined storage |
void |
skip(long id)
Method called when mensuration with id id is to be skipped. |
void |
start()
Method called by Stopwatch when initilializing Stopwatch engine. |
void |
stop()
Called when Stopwatch's engine is changed or for any other reason Stopwatch will no longer use this engine. |
Method Detail |
---|
void start()
void pause()
void resume()
void stop()
long begin(java.lang.String group, java.lang.String label)
group
- the name of the group this measurment should be placed inlabel
- how this measurment should be labeled
void end(long id)
id
- Unique ID representing the actual measurment that need to be stopped.void skip(long id)
id
is to be skipped. It is possible to
call this method multiple times with the same id, however the engine should process only the
first call.
id
- Unique ID representing the actual measurment that need to be stopped.void setStorage(StopwatchStorage storage)
storage
- the storage to be used by this enginevoid setPersistenceMode(int persistenceMode)
persistenceMode
- the mode persistence manager should work in.StorageManager.NORMAL_MODE
,
StorageManager.THREAD_MODE
,
StorageManager.DELAYED_MODE
java.lang.String getStorageClass()
StopwatchStorage getStorage()
void setDebugEnabled(boolean debugEnabled)
debugEnabled
- should debug information be generatedvoid setProperties(java.util.Properties properties)
properties
- the propertiesjava.util.Properties getProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |