Package com.netflix.appinfo
Class LeaseInfo.Builder
- java.lang.Object
-
- com.netflix.appinfo.LeaseInfo.Builder
-
- Enclosing class:
- LeaseInfo
public static final class LeaseInfo.Builder extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LeaseInfobuild()Build theInstanceInfo.static LeaseInfo.BuildernewBuilder()LeaseInfo.BuildersetDurationInSecs(int d)Sets the client specified setting for eviction (e.g.LeaseInfo.BuildersetEvictionTimestamp(long ts)Sets the de-registration timestamp.LeaseInfo.BuildersetRegistrationTimestamp(long ts)Sets the registration timestamp.LeaseInfo.BuildersetRenewalIntervalInSecs(int i)Sets the client specified setting for renew interval.LeaseInfo.BuildersetRenewalTimestamp(long ts)Sets the last renewal timestamp of lease.LeaseInfo.BuildersetServiceUpTimestamp(long ts)Sets the service UP timestamp.
-
-
-
Method Detail
-
newBuilder
public static LeaseInfo.Builder newBuilder()
-
setRegistrationTimestamp
public LeaseInfo.Builder setRegistrationTimestamp(long ts)
Sets the registration timestamp.- Parameters:
ts- time when the lease was first registered.- Returns:
- the
LeaseInfobuilder.
-
setRenewalTimestamp
public LeaseInfo.Builder setRenewalTimestamp(long ts)
Sets the last renewal timestamp of lease.- Parameters:
ts- time when the lease was last renewed.- Returns:
- the
LeaseInfobuilder.
-
setEvictionTimestamp
public LeaseInfo.Builder setEvictionTimestamp(long ts)
Sets the de-registration timestamp.- Parameters:
ts- time when the lease was removed.- Returns:
- the
LeaseInfobuilder.
-
setServiceUpTimestamp
public LeaseInfo.Builder setServiceUpTimestamp(long ts)
Sets the service UP timestamp.- Parameters:
ts- time when the leased service marked as UP.- Returns:
- the
LeaseInfobuilder.
-
setDurationInSecs
public LeaseInfo.Builder setDurationInSecs(int d)
Sets the client specified setting for eviction (e.g. how long to wait without renewal event).- Parameters:
d- time in seconds after which the lease would expire without renewa.- Returns:
- the
LeaseInfobuilder.
-
setRenewalIntervalInSecs
public LeaseInfo.Builder setRenewalIntervalInSecs(int i)
Sets the client specified setting for renew interval.- Parameters:
i- the time interval with which the renewals will be renewed.- Returns:
- the
LeaseInfobuilder.
-
build
public LeaseInfo build()
Build theInstanceInfo.- Returns:
- the
LeaseInfoinformation built based on the supplied information.
-
-