|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BackoffPolicy
A policy to be used when Txn or an atomic operation can't make any progress, e.g.
because there a ReadWriteConflict. If the next attempt would
be done without waiting, the contention is going to increase. It can be better to back off to give the
contending Transactions some time to complete so that the chance increases that the failing Txn
can complete at a next attempt.
Of course when there is a lot of contention, the BackoffPolicy isn't going to help and the Txn
could start to suffer from a livelock/starvation.
| Method Summary | |
|---|---|
void |
delay(int attempt)
Delays the calling Thread. |
void |
delayUninterruptible(int attempt)
Delays the calling Thread without being interrupted. |
| Method Detail |
|---|
void delay(int attempt)
throws InterruptedException
The implementation is free to make this a no-op call.
attempt -
InterruptedExceptionvoid delayUninterruptible(int attempt)
The implementation is free to make this a no-op call.
attempt - the
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||