public static class ObjectStoreSettings.Builder extends Object
ObjectStoreSettings
Modifier and Type | Method and Description |
---|---|
ObjectStoreSettings |
build()
Returns the built settings object.
|
ObjectStoreSettings.Builder |
entryTtl(Long entryTtl)
Sets the entry timeout in milliseconds.
|
ObjectStoreSettings.Builder |
expirationInterval(Long expirationInterval)
Sets how frequently should the expiration thread run.
|
ObjectStoreSettings.Builder |
maxEntries(Integer maxEntries)
Sets the max number of entries allowed.
|
ObjectStoreSettings.Builder |
persistent(boolean persistent)
Sets whether the store should be persistent or transient.
|
public ObjectStoreSettings.Builder persistent(boolean persistent)
If not invoked, the described ObjectStore
will be persistent by default.
persistent
- true
if the store should be persistentthis
builderpublic ObjectStoreSettings.Builder maxEntries(Integer maxEntries)
maxEntries
- the number of entries allowedthis
builderpublic ObjectStoreSettings.Builder entryTtl(Long entryTtl)
entryTtl
- timeout in millisecondsthis
builderpublic ObjectStoreSettings.Builder expirationInterval(Long expirationInterval)
If not set, it will default to ObjectStoreSettings.DEFAULT_EXPIRATION_INTERVAL
, but will only be used by the runtime
if entryTtl(Long)
or maxEntries(Integer)
was also invoked.
Setting this to a value lower or equal than zero is also equivalent to disabling expiration.
expirationInterval
- interval in milliseconds. Greater than zerothis
builderpublic ObjectStoreSettings build()
this
instance should be discarded and no longer used
after invoking this methodObjectStoreSettings
objectCopyright © 2018. All rights reserved.