Package dev.cachly
Class CachlyClient.LockHandle
java.lang.Object
dev.cachly.CachlyClient.LockHandle
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
CachlyClient
Handle returned by a successful
CachlyClient.lock(java.lang.String, long, int, long) call.
Call release() in a finally block to free the lock early.-
Method Summary
-
Method Details
-
getToken
Unique fencing token for this lock acquisition. -
release
public void release()Release the lock atomically. No-op if already expired or released. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-