Package org.bonitasoft.engine.tracking
Class TimeTracker
java.lang.Object
org.bonitasoft.engine.tracking.TimeTracker
- All Implemented Interfaces:
LifecycleService,TenantLifecycleService
-
Constructor Summary
ConstructorsConstructorDescriptionTimeTracker(boolean startTracking, List<FlushEventListener> flushEventListeners, int maxSize, int flushIntervalInSeconds, String... activatedRecords) TimeTracker(Clock clock, boolean startTracking, List<FlushEventListener> flushEventListeners, int maxSize, int flushIntervalInMS, String... activatedRecords) -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivateFlushEventListener(String flushEventListenerName) voidactivateRecord(TimeTrackerRecords activatedRecord) voidaddFlushEventListener(FlushEventListener flushEventListener) reference a new flushEventListener.voidvoiddeactivatedRecord(TimeTrackerRecords activatedRecord) booleandeactivateFlushEventListener(String flushEventListenerName) flush()get the list of Active ListenergetClock()return all Event Listeners, active or notlongbooleanisTrackable(TimeTrackerRecords recordName) booleanvoidpause()Temporary halt the execution of this service.voidremoveFlushEventListener(String flushEventListenerName) remove a flush event listenervoidresume()resume the execution the servicevoidsetFlushIntervalInMS(long flushIntervalInMS) voidsetFlushIntervalInSeconds(long flushIntervalInSeconds) voidstart()Start the servicevoidvoidstop()voidvoidtrack(TimeTrackerRecords recordName, String recordDescription, long duration) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bonitasoft.engine.commons.TenantLifecycleService
init
-
Constructor Details
-
TimeTracker
public TimeTracker(boolean startTracking, List<FlushEventListener> flushEventListeners, int maxSize, int flushIntervalInSeconds, String... activatedRecords) -
TimeTracker
public TimeTracker(Clock clock, boolean startTracking, List<FlushEventListener> flushEventListeners, int maxSize, int flushIntervalInMS, String... activatedRecords)
-
-
Method Details
-
getActiveFlushEventListeners
get the list of Active Listener -
getFlushEventListeners
return all Event Listeners, active or not -
addFlushEventListener
reference a new flushEventListener. The key of the reference is the flushEventListener.name(). If a listener exist with this name, it will be replaced. -
removeFlushEventListener
remove a flush event listener -
activateFlushEventListener
-
deactivateFlushEventListener
-
activateRecord
-
deactivatedRecord
-
getActivatedRecords
-
startTracking
public void startTracking() -
stopTracking
public void stopTracking() -
isTracking
public boolean isTracking() -
getFlushIntervalInMS
public long getFlushIntervalInMS() -
setFlushIntervalInSeconds
public void setFlushIntervalInSeconds(long flushIntervalInSeconds) -
setFlushIntervalInMS
public void setFlushIntervalInMS(long flushIntervalInMS) -
getClock
-
getStatus
-
isTrackable
-
track
-
flush
-
getRecordsCopy
-
clearRecords
public void clearRecords() -
start
public void start()Description copied from interface:LifecycleServiceStart the service- Specified by:
startin interfaceLifecycleService
-
stop
public void stop()- Specified by:
stopin interfaceLifecycleService
-
pause
public void pause()Description copied from interface:LifecycleServiceTemporary halt the execution of this service.- Specified by:
pausein interfaceLifecycleService
-
resume
public void resume()Description copied from interface:LifecycleServiceresume the execution the service- Specified by:
resumein interfaceLifecycleService
-