public static class DistributedMap.Options
extends io.atomix.resource.Resource.Options
| Constructor and Description |
|---|
Options() |
Options(Properties defaults) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLocalCache()
Returns whether local caching is enabled.
|
DistributedMap.Options |
withLocalCache()
Enables the local map cache.
|
DistributedMap.Options |
withLocalCache(boolean enableCache)
Sets whether to enable local caching.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesclear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, valuespublic Options()
public Options(Properties defaults)
public DistributedMap.Options withLocalCache()
When local caching is enabled, the DistributedMap will update a local in-memory map each
time a change event is received. The instance will hold the full map in memory and will service
all ReadConsistency.LOCAL reads from the local map. Thus, this feature should be used with
caution. Do not enable caching on large maps.
public DistributedMap.Options withLocalCache(boolean enableCache)
When local caching is enabled, the DistributedMap will update a local in-memory map each
time a change event is received. The instance will hold the full map in memory and will service
all ReadConsistency.LOCAL reads from the local map. Thus, this feature should be used with
caution. Do not enable caching on large maps.
enableCache - Whether to enable local caching.public boolean isLocalCache()
When local caching is enabled, the DistributedMap will update a local in-memory map each
time a change event is received.
Copyright © 2013–2017. All rights reserved.