Interface DistributedLock.Lease
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
DistributedLock
A lock claim that releases only its own ownership token when closed.
-
Method Summary
-
Method Details
-
renew
Extends this lease only if it is still owned by this instance.- Parameters:
duration- new lifetime measured from the renewal- Returns:
- whether ownership was retained and extended
-
close
void close()Releases this lease; repeated calls must be harmless.- Specified by:
closein interfaceAutoCloseable
-