Package org.kiwiproject.consul.config
Class CacheConfig
java.lang.Object
org.kiwiproject.consul.config.CacheConfig
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Method Summary
Modifier and TypeMethodDescriptionstatic CacheConfig.Builderbuilder()Creates a newCacheConfig.Builderobject.Gets the maximum back-off delay used in caches.Gets the minimum back-off delay used in caches.Gets the minimum time between two requests for caches.Gets the minimum time between two requests for caches.Gets the function that will be called in case of error.Gets the margin of the read timeout for caches.Gets the default watch duration for caches.booleanIs the automatic adjustment of read timeout enabled?
-
Method Details
-
getWatchDuration
Gets the default watch duration for caches.- Returns:
- the watch duration
-
getMinimumBackOffDelay
Gets the minimum back-off delay used in caches.- Returns:
- the minimum back-off delay
-
getMaximumBackOffDelay
Gets the maximum back-off delay used in caches.- Returns:
- maximum back-off delay
-
isTimeoutAutoAdjustmentEnabled
public boolean isTimeoutAutoAdjustmentEnabled()Is the automatic adjustment of read timeout enabled?- Returns:
- true if automatic adjustment of read timeout is enabled, otherwise false
-
getTimeoutAutoAdjustmentMargin
Gets the margin of the read timeout for caches.The margin represents the additional amount of time given to the read timeout, in addition to the wait duration.
- Returns:
- the margin of the read timeout
-
getMinimumDurationBetweenRequests
Gets the minimum time between two requests for caches.- Returns:
- the minimum time between two requests
-
getMinimumDurationDelayOnEmptyResult
Gets the minimum time between two requests for caches.- Returns:
- the minimum time between two requests
-
getRefreshErrorLoggingConsumer
Gets the function that will be called in case of error.- Returns:
- a RefreshErrorLogConsumer that will be called when errors occur
-
builder
Creates a newCacheConfig.Builderobject.- Returns:
- A new Consul builder.
-