Package deltix.util.io.idlestrat
Class BusySpinIdleStrategy
- java.lang.Object
-
- deltix.util.io.idlestrat.BusySpinIdleStrategy
-
- All Implemented Interfaces:
IdleStrategy
public class BusySpinIdleStrategy extends java.lang.Object implements IdleStrategy
Aggressively burns CPU cycles. Use only if you need to get lowest possible latency and can afford dedicated CPU core for each thread that uses this strategy.Try using
YieldingIdleStrategy
before tryingBusySpinIdleStrategy
.
-
-
Constructor Summary
Constructors Constructor Description BusySpinIdleStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
idle()
Idle action (sleep, wait, etc).void
idle(int workCount)
void
reset()
Reset the internal state (after doing some work).
-
-
-
Method Detail
-
idle
public void idle(int workCount)
- Specified by:
idle
in interfaceIdleStrategy
- Parameters:
workCount
- amount of work done in the last cycle. Value "0" means that no work as done and some data form an external source expected.
-
idle
public void idle()
Description copied from interface:IdleStrategy
Idle action (sleep, wait, etc).- Specified by:
idle
in interfaceIdleStrategy
-
reset
public void reset()
Description copied from interface:IdleStrategy
Reset the internal state (after doing some work).- Specified by:
reset
in interfaceIdleStrategy
-
-