Class TimeTracker

java.lang.Object
org.bonitasoft.engine.tracking.TimeTracker
All Implemented Interfaces:
LifecycleService, TenantLifecycleService

public class TimeTracker extends Object implements TenantLifecycleService
  • 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

      public List<FlushEventListener> getActiveFlushEventListeners()
      get the list of Active Listener
    • getFlushEventListeners

      public List<FlushEventListener> getFlushEventListeners()
      return all Event Listeners, active or not
    • addFlushEventListener

      public void addFlushEventListener(FlushEventListener flushEventListener)
      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

      public void removeFlushEventListener(String flushEventListenerName)
      remove a flush event listener
    • activateFlushEventListener

      public boolean activateFlushEventListener(String flushEventListenerName)
    • deactivateFlushEventListener

      public boolean deactivateFlushEventListener(String flushEventListenerName)
    • activateRecord

      public void activateRecord(TimeTrackerRecords activatedRecord)
    • deactivatedRecord

      public void deactivatedRecord(TimeTrackerRecords activatedRecord)
    • getActivatedRecords

      public Set<TimeTrackerRecords> 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

      public Clock getClock()
    • getStatus

      public String getStatus()
    • isTrackable

      public boolean isTrackable(TimeTrackerRecords recordName)
    • track

      public void track(TimeTrackerRecords recordName, String recordDescription, long duration)
    • flush

      public FlushResult flush()
    • getRecordsCopy

      public List<Record> getRecordsCopy()
    • clearRecords

      public void clearRecords()
    • start

      public void start()
      Description copied from interface: LifecycleService
      Start the service
      Specified by:
      start in interface LifecycleService
    • stop

      public void stop()
      Specified by:
      stop in interface LifecycleService
    • pause

      public void pause()
      Description copied from interface: LifecycleService
      Temporary halt the execution of this service.
      Specified by:
      pause in interface LifecycleService
    • resume

      public void resume()
      Description copied from interface: LifecycleService
      resume the execution the service
      Specified by:
      resume in interface LifecycleService