public class LockUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static io.vertx.core.Future<java.lang.Boolean> |
acquireLock(Lock lockImpl,
java.lang.String lock,
java.lang.String token,
long lockExpiryMs,
org.slf4j.Logger log)
Acquire a lock.
|
static void |
releaseLock(Lock lockImpl,
java.lang.String lock,
java.lang.String token,
org.slf4j.Logger log)
Release a lock.
|
public static io.vertx.core.Future<java.lang.Boolean> acquireLock(Lock lockImpl, java.lang.String lock, java.lang.String token, long lockExpiryMs, org.slf4j.Logger log)
Boolean.TRUE when no lock implementation is providedlockImpl - the lock implementationlock - the locktoken - the unique tokenlockExpiryMs - the expiry of the locklog - the loggerFuture whether the lock could has been acquired or notpublic static void releaseLock(Lock lockImpl, java.lang.String lock, java.lang.String token, org.slf4j.Logger log)
lockImpl - the lock implementationlock - the locktoken - the unique tokenlog - the Logger