Package com.orbitz.consul.config
Class CacheConfig
- java.lang.Object
-
- com.orbitz.consul.config.CacheConfig
-
public class CacheConfig extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheConfig.Builderstatic interfaceCacheConfig.RefreshErrorLogConsumer
-
Method Summary
Modifier and Type Method Description static CacheConfig.Builderbuilder()Creates a newCacheConfig.Builderobject.java.time.DurationgetMaximumBackOffDelay()Gets the maximum back-off delay used in caches.java.time.DurationgetMinimumBackOffDelay()Gets the minimum back-off delay used in caches.java.time.DurationgetMinimumDurationBetweenRequests()Gets the minimum time between two requests for caches.java.time.DurationgetMinimumDurationDelayOnEmptyResult()Gets the minimum time between two requests for caches.CacheConfig.RefreshErrorLogConsumergetRefreshErrorLoggingConsumer()Gets the function that will be called in case of error.java.time.DurationgetTimeoutAutoAdjustmentMargin()Gets the margin of the read timeout for caches.java.time.DurationgetWatchDuration()Gets the default watch duration for caches.booleanisTimeoutAutoAdjustmentEnabled()Is the automatic adjustment of read timeout enabled?
-
-
-
Method Detail
-
getWatchDuration
public java.time.Duration getWatchDuration()
Gets the default watch duration for caches.
-
getMinimumBackOffDelay
public java.time.Duration getMinimumBackOffDelay()
Gets the minimum back-off delay used in caches.
-
getMaximumBackOffDelay
public java.time.Duration getMaximumBackOffDelay()
Gets the maximum back-off delay used in caches.
-
isTimeoutAutoAdjustmentEnabled
public boolean isTimeoutAutoAdjustmentEnabled()
Is the automatic adjustment of read timeout enabled?
-
getTimeoutAutoAdjustmentMargin
public java.time.Duration 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.
-
getMinimumDurationBetweenRequests
public java.time.Duration getMinimumDurationBetweenRequests()
Gets the minimum time between two requests for caches.
-
getMinimumDurationDelayOnEmptyResult
public java.time.Duration getMinimumDurationDelayOnEmptyResult()
Gets the minimum time between two requests for caches.
-
getRefreshErrorLoggingConsumer
public CacheConfig.RefreshErrorLogConsumer getRefreshErrorLoggingConsumer()
Gets the function that will be called in case of error.
-
builder
public static CacheConfig.Builder builder()
Creates a newCacheConfig.Builderobject.- Returns:
- A new Consul builder.
-
-