Module org.elasticsearch.server
Package org.elasticsearch.common.network
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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
Methods inherited from class java.util.concurrent.atomic.AtomicLong
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Constructor Details
-
ActivityTracker
public ActivityTracker()
-
-
Method Details
-
startActivity
public void startActivity() -
maybeStartActivity
public boolean maybeStartActivity() -
stopActivity
public void stopActivity()
-