@Stability.Internal public class ReactiveLock extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReactiveLock.Waiter |
| Constructor and Description |
|---|
ReactiveLock(CoreTransactionAttemptContext ctx,
boolean debugMode) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
debugAsSingleThreaded() |
boolean |
isLocked() |
Mono<ReactiveLock.Waiter> |
lock(String dbg,
Duration timeout)
if the lock is unlocked, lock it, and continue
else if the lock is locked, join the list of things waiting for it to be unlocked
|
Mono<Void> |
unlock(ReactiveLock.Waiter waiter)
The thing currently waiting on this lock is now unlocking it.
|
Mono<Void> |
unlock(ReactiveLock.Waiter waiter,
String extraDbg) |
Mono<Void> |
unlock(ReactiveLock.Waiter waiter,
String extraDbg,
boolean removeFromWaiters) |
public ReactiveLock(CoreTransactionAttemptContext ctx, boolean debugMode)
public Mono<ReactiveLock.Waiter> lock(String dbg, Duration timeout)
public Mono<Void> unlock(ReactiveLock.Waiter waiter)
It's reactive style as always need to do a .timeout() after it
public Mono<Void> unlock(ReactiveLock.Waiter waiter, @Nullable String extraDbg)
public Mono<Void> unlock(ReactiveLock.Waiter waiter, @Nullable String extraDbg, boolean removeFromWaiters)
public boolean debugAsSingleThreaded()
public boolean isLocked()
Copyright © 2024 Couchbase, Inc.. All rights reserved.