Class LeaseInfo.Builder
java.lang.Object
io.micronaut.discovery.eureka.client.v2.LeaseInfo.Builder
- Enclosing class:
- LeaseInfo
A builder class.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theInstanceInfo.static LeaseInfo.BuildersetDurationInSecs(int d) Sets the client specified setting for eviction (e.g.setEvictionTimestamp(long ts) Sets the de-registration timestamp.setRegistrationTimestamp(long ts) Sets the registration timestamp.setRenewalIntervalInSecs(int i) Sets the client specified setting for renew interval.setRenewalTimestamp(long ts) Sets the last renewal timestamp of lease.setServiceUpTimestamp(long ts) Sets the service UP timestamp.
-
Method Details
-
newBuilder
- Returns:
- A new instance of the builder
-
setRegistrationTimestamp
Sets the registration timestamp.- Parameters:
ts- time when the lease was first registered.- Returns:
- the
LeaseInfobuilder.
-
setRenewalTimestamp
Sets the last renewal timestamp of lease.- Parameters:
ts- time when the lease was last renewed.- Returns:
- the
LeaseInfobuilder.
-
setEvictionTimestamp
Sets the de-registration timestamp.- Parameters:
ts- time when the lease was removed.- Returns:
- the
LeaseInfobuilder.
-
setServiceUpTimestamp
Sets the service UP timestamp.- Parameters:
ts- time when the leased service marked as UP.- Returns:
- the
LeaseInfobuilder.
-
setDurationInSecs
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
Sets the client specified setting for renew interval.- Parameters:
i- the time interval with which the renewals will be renewed.- Returns:
- the
LeaseInfobuilder.
-
build
Build theInstanceInfo.- Returns:
- the
LeaseInfoinformation built based on the supplied information.
-