public final class Lease extends Object
Modifier and Type | Method and Description |
---|---|
static Lease |
create(Duration timeToLive,
int numberOfRequests) |
static Lease |
create(Duration timeToLive,
int numberOfRequests,
ByteBuf metadata) |
static Lease |
empty() |
long |
expirationTime()
Absolute time since epoch at which this lease will expire.
|
ByteBuf |
metadata()
Metadata for the lease.
|
int |
numberOfRequests()
Number of requests allowed by this lease.
|
int |
timeToLiveInMillis()
Time to live for the given lease
|
String |
toString() |
static Lease |
unbounded() |
static Lease |
unbounded(ByteBuf metadata) |
public static Lease create(Duration timeToLive, int numberOfRequests, @Nullable ByteBuf metadata)
public static Lease unbounded()
public static Lease empty()
public int numberOfRequests()
public int timeToLiveInMillis()
public long expirationTime()
@Nullable public ByteBuf metadata()