Readonly
durationReadonly
k8Readonly
leaseReadonly
leaseReadonly
namespaceReadonly
renewalChecks if the lease is acquired. If the lease is acquired and not expired, it returns true; otherwise, false.
true if the lease is acquired and not expired; otherwise, false.
Checks if the lease is expired. If the lease is expired, it returns true; otherwise, false. This method does not verify if the lease is acquired by the current process.
true if the lease is expired; otherwise, false.
Releases the lease. If the lease is expired or held by the same process, it deletes the lease. If the lease is held by another process, then an exception is thrown.
Renews the lease. If the lease is expired or held by the same process, it creates or renews the lease. If the lease is held by another process, then an exception is thrown.
Attempts to acquire the lease, by calling the acquire method. If an exception is thrown, it is caught and false is returned. If the lease is successfully acquired, true is returned; otherwise, false is returned.
true if the lease is successfully acquired; otherwise, false.
Attempts to release the lease, by calling the release method. If an exception is thrown, it is caught and false is returned. If the lease is successfully released, true is returned; otherwise, false is returned.
true if the lease is successfully released; otherwise, false.
Attempts to renew the lease, by calling the renew method. If an exception is thrown, it is caught and false is returned. If the lease is successfully renewed, true is returned; otherwise, false is returned.
true if the lease is successfully renewed; otherwise, false.
Acquires the lease. If the lease is already acquired, it checks if the lease is expired or held by the same process. If the lease is expired, it creates a new lease. If the lease is held by the same process, it renews the lease. If the lease is held by another process, then an exception is thrown.