|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - Key typeV - Value typepublic interface DistributedCache<K,V>
DistributedCache is a distributed, Terracotta-backed, clustered cache with eviction. Object identity is maintained across the cluster such that an object put into the cache is seen as the same object across all nodes and changes to that object will be maintained across all nodes. Note that this implies that changes to keys or values held in the DistributedCache must be done with appropriate locking on the key or value object to maintain proper Java memory model semantics.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | |
|---|---|
CacheConfig |
getConfig()
Get the current config for the cache (which may or may not be the config passed to the cache originally. |
String |
getLockIdForKey(K key)
Retrieves a lock ID that's specific for this cache and key. |
TimestampedValue<V> |
getTimestampedValue(K key)
Get the value wrapped in a timestamped object. |
TimestampedValue<V> |
getTimestampedValueQuiet(K key)
Get the value wrapped in a timestamped object without updating the last usage statistics. |
int |
localSize()
Get the number of elements local in the current node - this number should always be less than size(), and is likely to be different. |
void |
putNoReturn(K key,
V value)
Put the key/value into the map, replacing the existing value if present. |
void |
removeNoReturn(Object key)
Remove the key from the map, if it exists. |
TimestampedValue<V> |
removeTimestampedValue(K key)
Remove the timestamped value for the given key. |
void |
shutdown()
Shut down the background eviction thread, if any. |
| Methods inherited from interface java.util.concurrent.ConcurrentMap |
|---|
putIfAbsent, remove, replace, replace |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from interface org.terracotta.collections.LockableMap |
|---|
createFinegrainedLock, lockEntry, unlockEntry |
| Method Detail |
|---|
void putNoReturn(K key,
V value)
key - Keyvalue - Valuevoid removeNoReturn(Object key)
key - KeyTimestampedValue<V> getTimestampedValue(K key)
key - The key to search for
TimestampedValue<V> getTimestampedValueQuiet(K key)
key - The key to search for
getTimestampedValue(Object)TimestampedValue<V> removeTimestampedValue(K key)
key - The key to search for
CacheConfig getConfig()
int localSize()
void shutdown()
String getLockIdForKey(K key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||