Class TimeTracker

    • Constructor Detail

      • TimeTracker

        public TimeTracker​(boolean startTracking,
                           java.util.List<FlushEventListener> flushEventListeners,
                           int maxSize,
                           int flushIntervalInSeconds,
                           java.lang.String... activatedRecords)
      • TimeTracker

        public TimeTracker​(Clock clock,
                           boolean startTracking,
                           java.util.List<FlushEventListener> flushEventListeners,
                           int maxSize,
                           int flushIntervalInMS,
                           java.lang.String... activatedRecords)
    • Method Detail

      • getActiveFlushEventListeners

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

        public java.util.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​(java.lang.String flushEventListenerName)
        remove a flush event listener
      • activateFlushEventListener

        public boolean activateFlushEventListener​(java.lang.String flushEventListenerName)
      • deactivateFlushEventListener

        public boolean deactivateFlushEventListener​(java.lang.String flushEventListenerName)
      • deactivatedRecord

        public void deactivatedRecord​(TimeTrackerRecords activatedRecord)
      • 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 java.lang.String getStatus()
      • track

        public void track​(TimeTrackerRecords recordName,
                          java.lang.String recordDescription,
                          long duration)
      • getRecordsCopy

        public java.util.List<Record> getRecordsCopy()
      • clearRecords

        public void clearRecords()