public class LeaseInfo
extends java.lang.Object
Eureka decides to remove the instance out of its view depending on
the duration that is set in
EurekaInstanceConfig.getLeaseExpirationDurationInSeconds()
which is
held in this lease. The lease also tracks the last time it was renewed.
Modifier and Type | Class and Description |
---|---|
static class |
LeaseInfo.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LEASE_DURATION |
static int |
DEFAULT_LEASE_RENEWAL_INTERVAL |
Constructor and Description |
---|
LeaseInfo(int renewalIntervalInSecs,
int durationInSecs,
long registrationTimestamp,
java.lang.Long lastRenewalTimestamp,
long lastRenewalTimestampLegacy,
long evictionTimestamp,
long serviceUpTimestamp)
TODO: note about renewalTimestamp legacy:
The previous change to use Jackson ser/deser changed the field name for lastRenewalTimestamp to renewalTimestamp
for serialization, which causes an incompatibility with the jacksonNG codec when the server returns data with
field renewalTimestamp and jacksonNG expects lastRenewalTimestamp.
|
Modifier and Type | Method and Description |
---|---|
int |
getDurationInSecs()
Returns client specified setting for eviction (e.g.
|
long |
getEvictionTimestamp()
Returns the de-registration timestamp.
|
long |
getRegistrationTimestamp()
Returns the registration timestamp.
|
int |
getRenewalIntervalInSecs()
Returns client specified setting for renew interval.
|
long |
getRenewalTimestamp()
Returns the last renewal timestamp of lease.
|
long |
getServiceUpTimestamp()
Returns the service UP timestamp.
|
public static final int DEFAULT_LEASE_RENEWAL_INTERVAL
public static final int DEFAULT_LEASE_DURATION
public LeaseInfo(int renewalIntervalInSecs, int durationInSecs, long registrationTimestamp, java.lang.Long lastRenewalTimestamp, long lastRenewalTimestampLegacy, long evictionTimestamp, long serviceUpTimestamp)
public long getRegistrationTimestamp()
public long getRenewalTimestamp()
public long getEvictionTimestamp()
public long getServiceUpTimestamp()
public int getRenewalIntervalInSecs()
public int getDurationInSecs()