static class LeaseManager.Lease extends Object implements Delayed
Modifier and Type | Field and Description |
---|---|
private long |
expirationTime |
private String |
leaseName |
private int |
leaseTimeoutPeriod |
private LeaseListener |
listener |
Constructor and Description |
---|
Lease(String leaseName,
int leaseTimeoutPeriod,
LeaseListener listener) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Delayed o) |
boolean |
equals(Object obj) |
long |
getDelay(TimeUnit unit) |
String |
getLeaseName()
Returns the lease name
|
LeaseListener |
getListener()
Returns listener
|
int |
hashCode() |
void |
resetExpirationTime()
Resets the expiration time of the lease.
|
private final LeaseListener listener
private int leaseTimeoutPeriod
private long expirationTime
Lease(String leaseName, int leaseTimeoutPeriod, LeaseListener listener)
public String getLeaseName()
public LeaseListener getListener()
public int compareTo(Delayed o)
compareTo
in interface Comparable<Delayed>
public void resetExpirationTime()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.