A Lease is a cluster-wide time-based lock on a given resource. Leases are retrieved via LeaseManager.requestLease.
It should be assumed that calls to checkHeld, acquire and release could invoke remote calls, so consider usage carefully.
Attempts to acquire the lock on the lease. If the lock was not already held and the lock was successfully obtained, listeners should be notified.
Registers a listener that is called on lease state changes.
Release the lock on the lease. This will return true if released. Note that it will return false if the lease was not held. Listeners should be notified before the lock is released.