Class ThreadWatchdog.ActivityTracker

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicLong
org.elasticsearch.common.network.ThreadWatchdog.ActivityTracker
All Implemented Interfaces:
Serializable
Enclosing class:
ThreadWatchdog

public static final class ThreadWatchdog.ActivityTracker extends AtomicLong
Per-thread class which keeps track of activity on that thread, represented as a long which is incremented every time an activity starts or stops. Thus the parity of its value indicates whether the thread is idle or not. Crucially, the activity tracking is very lightweight (on the tracked thread).
See Also:
  • Constructor Details

    • ActivityTracker

      public ActivityTracker()
  • Method Details

    • startActivity

      public void startActivity()
    • maybeStartActivity

      public boolean maybeStartActivity()
    • stopActivity

      public void stopActivity()