public interface Lease
| Modifier and Type | Method and Description |
|---|---|
long |
expiry()
Absolute time since epoch at which this lease will expire.
|
int |
getAllowedRequests()
Number of requests allowed by this lease.
|
ByteBuffer |
getMetadata()
Metadata for the lease.
|
int |
getTtl()
Number of seconds that this lease is valid from the time it is received.
|
default boolean |
isExpired()
Checks if the lease is expired now.
|
default boolean |
isExpired(long now)
Checks if the lease is expired for the passed
now. |
int getAllowedRequests()
int getTtl()
long expiry()
@Nullable ByteBuffer getMetadata()
default boolean isExpired()
true if the lease has expired.default boolean isExpired(long now)
now.now - current time in millis.true if the lease has expired.