@PublicApi public class JvmCacheSettingsBuilder extends Object
JvmCacheSettings instances.| Constructor and Description |
|---|
JvmCacheSettingsBuilder()
Creates an instance with no settings initialised.
|
JvmCacheSettingsBuilder(JvmCacheSettings settings)
Constructs an instance initialised with the supplied settings.
|
| Modifier and Type | Method and Description |
|---|---|
JvmCacheSettings |
build()
Returns a new
JvmCacheSettings instance configured using the supplied settings. |
JvmCacheSettingsBuilder |
defaultTtl(Duration ttl)
Specifies the default time-to-live for entries to be held in the cache.
|
JvmCacheSettingsBuilder |
maxEntries(int max)
Specifies the maximum number of entries to be held in the cache.
|
public JvmCacheSettingsBuilder()
public JvmCacheSettingsBuilder(JvmCacheSettings settings)
settings - the settings to configure the instance with.@Nonnull public JvmCacheSettings build()
JvmCacheSettings instance configured using the supplied settings.JvmCacheSettings instance configured using the supplied settings.@Nonnull public JvmCacheSettingsBuilder maxEntries(int max)
max - the number of entries to be held in the cacheIllegalArgumentException - thrown if max is negative@Nonnull public JvmCacheSettingsBuilder defaultTtl(Duration ttl)
ttl - the default time-to-live for entries to be held in the cacheIllegalArgumentException - thrown if ttl is not positiveCopyright © 2015 Atlassian. All rights reserved.