@FunctionalInterface public interface IdleStrategy
Modifier and Type | Field and Description |
---|---|
static IdleStrategy |
NO_OP
Idle strategy that performs a no-OP, that is, an idle loop will essentially become a busy-spin loop.
|
Modifier and Type | Method and Description |
---|---|
void |
idle()
Invoked if no work was done
|
default void |
idle(boolean workDone)
Invoked with boolean flag indicating whether work was done or not.
|
default void |
reset()
Invoked if some work was performed and an idle strategy should reset to prepare for the next idle phase
|
static final IdleStrategy NO_OP
void idle()
default void idle(boolean workDone)
reset()
when work was
done and to idle()
if not.workDone
- true if some work was performeddefault void reset()