-
public interface UninterruptibleBlockingStrategySpecifies the way to block current thread to amount of time required to refill missed number of tokens in the bucket. There is default implementationPARKING, also you can provide any other implementation which for example does something useful instead of blocking(acts as co-routine) or does spin loop.
-
-
Field Summary
Fields Modifier and Type Field Description static UninterruptibleBlockingStrategyPARKING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidparkUninterruptibly(long nanosToPark)Parks current thread to required duration of nanoseconds ignoring all interrupts, if interrupt was happen then interruption flag will be restored on the current thread.
-
-
-
Field Detail
-
PARKING
static final UninterruptibleBlockingStrategy PARKING
-
-
Method Detail
-
parkUninterruptibly
void parkUninterruptibly(long nanosToPark)
Parks current thread to required duration of nanoseconds ignoring all interrupts, if interrupt was happen then interruption flag will be restored on the current thread.- Parameters:
nanosToPark- time to park in nanoseconds
-
-