public final class YieldCounterListener extends NullListener
In effect, this class provides a way to "wake up" an infrequent service periodically.
Modifier and Type | Field and Description |
---|---|
private int |
numYields |
private int |
totalYields |
private int |
yieldThreshold |
Constructor and Description |
---|
YieldCounterListener(int yieldThreshold)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
report()
Entry point to dump what has been collected.
|
void |
reset()
No-op.
|
void |
update(int whereFrom)
This method is called when its time to record that a
yield point has occurred.
|
activate, activateOrganizer, isActive, passivate, setOrganizer
private final int yieldThreshold
private final int numYields
private int totalYields
public YieldCounterListener(int yieldThreshold)
yieldThreshold
- the threshold of when to call organizerpublic void update(int whereFrom)
NullListener
update
in class NullListener
whereFrom
- Was this a yieldpoint in a PROLOGUE, BACKEDGE, or
EPILOGUE?public void report()
Listener