Interface NodeLease
public interface NodeLease
-
Method Summary
Modifier and TypeMethodDescription@Nullable Nodenode()Returns theNoderepresentation for this lease if the lease has not been released ornull.intReturns the node ID if the lease is active/valid or-1.voidrelease()Permanently release the lease.voidrenew()Force a lease renewal, generally not recommended nor necessary.
-
Method Details
-
node
@Nullable Node node()Returns theNoderepresentation for this lease if the lease has not been released ornull. -
release
void release()Permanently release the lease. Does nothing, if already released.If persisting the released state fails, this lease is still considered locally released and cannot be retried or reused. The backend lease may therefore remain live until it expires naturally.
-
renew
void renew()Force a lease renewal, generally not recommended nor necessary. Throws, if the lease is already released. -
nodeIdIfValid
int nodeIdIfValid()Returns the node ID if the lease is active/valid or-1.
-