Package deltix.util.io.idlestrat
Class YieldingIdleStrategy
- java.lang.Object
-
- deltix.util.io.idlestrat.YieldingIdleStrategy
-
- All Implemented Interfaces:
IdleStrategy
public class YieldingIdleStrategy extends java.lang.Object implements IdleStrategy
Provides good latency without fully overloading CPU core likeBusySpinIdleStrategy.
-
-
Constructor Summary
Constructors Constructor Description YieldingIdleStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voididle()Idle action (sleep, wait, etc).voididle(int workCount)voidreset()Reset the internal state (after doing some work).
-
-
-
Method Detail
-
idle
public void idle(int workCount)
- Specified by:
idlein 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:IdleStrategyIdle action (sleep, wait, etc).- Specified by:
idlein interfaceIdleStrategy
-
reset
public void reset()
Description copied from interface:IdleStrategyReset the internal state (after doing some work).- Specified by:
resetin interfaceIdleStrategy
-
-