@PublicApi public class ExternalCacheSettingsBuilder extends Object
ExternalCacheSettings instances.| Constructor and Description |
|---|
ExternalCacheSettingsBuilder()
Creates an instance with no settings initialised.
|
ExternalCacheSettingsBuilder(ExternalCacheSettings settings)
Constructs an instance initialised with the supplied settings.
|
| Modifier and Type | Method and Description |
|---|---|
ExternalCacheSettings |
build()
Returns a new
ExternalCacheSettings instance configured using the supplied settings. |
ExternalCacheSettingsBuilder |
dataChangeRateHint(ChangeRate hint)
Provides a hint on the expected change rate for data updates.
|
ExternalCacheSettingsBuilder |
defaultTtl(Duration ttl)
Specifies the default time-to-live for entries to be held in the cache.
|
ExternalCacheSettingsBuilder |
entryCountHint(int hint)
Provides a hint on the expected number of entries to be held in the cache.
|
ExternalCacheSettingsBuilder |
entryGrowthRateHint(ChangeRate hint)
Provides a hint on the expected change rate for entry additions.
|
public ExternalCacheSettingsBuilder()
public ExternalCacheSettingsBuilder(ExternalCacheSettings settings)
settings - the settings to configure the instance with.@Nonnull public ExternalCacheSettings build()
ExternalCacheSettings instance configured using the supplied settings.ExternalCacheSettings instance configured using the supplied settings.@Nonnull public ExternalCacheSettingsBuilder defaultTtl(Duration ttl)
ttl - the default time-to-live for entries to be held in the cacheIllegalArgumentException - thrown if ttl is not positive@Nonnull public ExternalCacheSettingsBuilder entryCountHint(int hint)
hint - the expected number of entries to be held in the cacheIllegalArgumentException - thrown if hint is negative@Nonnull public ExternalCacheSettingsBuilder dataChangeRateHint(ChangeRate hint)
hint - the expected change rate for data updates.@Nonnull public ExternalCacheSettingsBuilder entryGrowthRateHint(ChangeRate hint)
hint - the expected change rate for entry additions.Copyright © 2015 Atlassian. All rights reserved.