Package org.swisspush.gateleen.core.util
Class LockUtil
- java.lang.Object
-
- org.swisspush.gateleen.core.util.LockUtil
-
public class LockUtil extends Object
Class HttpServerRequestUtil.- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.vertx.core.Future<Boolean>acquireLock(Lock lockImpl, String lock, String token, long lockExpiryMs, org.slf4j.Logger log)Acquire a lock.static voidreleaseLock(Lock lockImpl, String lock, String token, org.slf4j.Logger log)Release a lock.
-
-
-
Method Detail
-
acquireLock
public static io.vertx.core.Future<Boolean> acquireLock(Lock lockImpl, String lock, String token, long lockExpiryMs, org.slf4j.Logger log)
Acquire a lock. Resolves always toBoolean.TRUEwhen no lock implementation is provided- Parameters:
lockImpl- the lock implementationlock- the locktoken- the unique tokenlockExpiryMs- the expiry of the locklog- the logger- Returns:
- A boolean
Futurewhether the lock could has been acquired or not
-
-