public class BackOffStrategy extends Object
| Constructor and Description |
|---|
BackOffStrategy() |
BackOffStrategy(int spinUntilYield,
int yieldUntilPark,
int parkUntilSleep) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNanosToPark() |
void |
setCounters(int spinUntilYield,
int yieldUntilPark,
int parkUntilSleep) |
void |
setNanosToPark(int nanosToPark) |
void |
yield(int count) |
public BackOffStrategy()
public BackOffStrategy(int spinUntilYield,
int yieldUntilPark,
int parkUntilSleep)
spinUntilYield - - number of busy spins until Thread.yield is usedyieldUntilPark - - number of Thread.yield iterations until parkNanos(1) is usedparkUntilSleep - - number of parkNanos(1) is used until park(nanosToPark) is used. Default for nanosToPark is 0.5 millisecondsCopyright © 2014. All rights reserved.