public interface LockHandle
Mono to listen to and a canceller function).| Modifier and Type | Interface and Description |
|---|---|
static class |
LockHandle.CancellableHandle |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Attempts to cancels a lock request
|
static LockHandle |
empty() |
static LockHandle |
from(Mono<Void> mono,
Supplier<Boolean> canceller) |
Mono<Void> |
mono()
Returns a
Mono that emits success only after acquiring the lock |
static LockHandle empty()
static LockHandle from(Mono<Void> mono, Supplier<Boolean> canceller)
boolean cancel()
true if successfully cancelledfalse if you have acquired the lock, probably just raced with the cancel request