|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.collections.ConcurrentDistributedMap<K,V>
org.terracotta.collections.ConcurrentDistributedServerMap<K,V>
K - type of mapped keysV - type of mapped valuespublic class ConcurrentDistributedServerMap<K,V>
A ConcurrentMap that automatically switches its implementation to one that is highly concurrent server-side
map in a Terracotta DSO cluster. When Terracotta DSO isn't active, a traditional ConcurrentMap implementation
like ConcurrentHashMap is used within a single JVM.
Map entries can't use null for keys or values.
One of the map difference between EnterpriseConcurrentDistributedMap and ConcurrentDistributedMap is
the DCV2 Storage Strategy; This allows for an unlimited key-space for this map.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static int |
SERVERMAP_DEFAULT_CONCURRENCY
|
| Fields inherited from class org.terracotta.collections.ConcurrentDistributedMap |
|---|
cacheConfig, DEFAULT_CONCURRENCY, DEFAULT_INVALIDATE_ON_CHANGE, deleteValueOnRemove, invalidateOnChange, map, mutateCallbacks |
| Constructor Summary | |
|---|---|
ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency)
|
|
ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency,
boolean invalidateOnChange)
|
|
ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency,
boolean invalidateOnChange,
boolean deleteValueOnRemove)
|
|
ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
LockStrategy<? super K> lockStrategy)
Creates a new EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures. |
|
ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
LockStrategy<? super K> lockStrategy,
int concurrency)
Creates a new EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures. |
|
ConcurrentDistributedServerMap(ConcurrentDistributedServerMapParameters<K,L> parameters)
|
|
ConcurrentDistributedServerMap(LockType lockType,
LockStrategy<? super K> lockStrategy)
Creates a new EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active. |
|
ConcurrentDistributedServerMap(LockType lockType,
LockStrategy<? super K> lockStrategy,
int concurrency)
Creates a new EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures |
|
| Method Summary | ||
|---|---|---|
void |
addCacheEvictionListener(CacheEvictionListener listener)
|
|
void |
clearLocalCache()
Clears the local cache |
|
boolean |
containsKeyLocalOffHeap(Object key)
|
|
boolean |
containsKeyLocalOnHeap(Object key)
|
|
void |
destroyLocalCache()
|
|
Collection<Map.Entry<K,V>> |
getAllEntriesSnapshot()
A collection of all entries within this map. |
|
protected
|
initBackend(CacheConfig cacheConfigParam,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency)
|
|
void |
initializeLocalCache()
|
|
boolean |
isEmpty()
This method reflects the state of the map instance that is local on the node. |
|
int |
localOffHeapSize()
|
|
long |
localOffHeapSizeInBytes()
|
|
int |
localOnHeapSize()
|
|
long |
localOnHeapSizeInBytes()
|
|
void |
onLoad()
|
|
void |
recalculateLocalCacheSize(Object key)
|
|
void |
removeCacheEvictionListener(CacheEvictionListener listener)
|
|
void |
setLocalCacheEnabled(boolean enabled)
|
|
void |
setMaxBytesLocalHeap(long maxBytesLocalHeap)
|
|
void |
setMaxEntriesLocalHeap(int maxEntriesLocalHeap)
|
|
void |
setMaxTTI(int maxTTI)
|
|
void |
setMaxTTL(int maxTTL)
|
|
void |
setTargetMaxTotalCount(int targetMaxTotalCount)
|
|
int |
size()
This method reflects the state of the map instance that is local on the node. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final int SERVERMAP_DEFAULT_CONCURRENCY
| Constructor Detail |
|---|
public ConcurrentDistributedServerMap(LockType lockType,
LockStrategy<? super K> lockStrategy)
EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active.
lockType - the lock type that should be used internally when Terracotta DSO is activelockStrategy - the lock strategy to use for this mapLockType,
LockStrategy
public ConcurrentDistributedServerMap(LockType lockType,
LockStrategy<? super K> lockStrategy,
int concurrency)
EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures
lockType - the lock type that should be used internally when Terracotta DSO is activelockStrategy - the lock strategy to use for this mapconcurrency - the estimated number of concurrently updating threadsLockType,
LockStrategy
public ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
LockStrategy<? super K> lockStrategy)
EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures.
cacheConfig - specific configuration for cache (i.e. tti, tti)lockType - the lock type that should be used internally when Terracotta DSO is activelockStrategy - the lock strategy to use for this mapCacheConfig,
LockType,
LockStrategy
public ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
LockStrategy<? super K> lockStrategy,
int concurrency)
EnterpriseConcurrentDistributedMap instance that allows the specification of the internal
lock type that should be used when Terracotta DSO is active and the concurrency of internal data structures.
cacheConfig - specific configuration for cache (i.e. tti, tti)lockType - the lock type that should be used internally when Terracotta DSO is activelockStrategy - the lock strategy to use for this mapconcurrency - the estimated number of concurrently updating threadsCacheConfig,
LockType,
LockStrategy
public ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency)
public ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency,
boolean invalidateOnChange,
boolean deleteValueOnRemove)
public ConcurrentDistributedServerMap(CacheConfig cacheConfig,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency,
boolean invalidateOnChange)
public ConcurrentDistributedServerMap(ConcurrentDistributedServerMapParameters<K,L> parameters)
| Method Detail |
|---|
protected <L> ClusteredMap<K,V> initBackend(CacheConfig cacheConfigParam,
LockType lockType,
GenericLockStrategy<L,? super K> lockStrategy,
int concurrency)
public void onLoad()
public void clearLocalCache()
LocallyCacheable
clearLocalCache in interface LocallyCacheablepublic void addCacheEvictionListener(CacheEvictionListener listener)
addCacheEvictionListener in interface CacheEvictionListenerSupportpublic void removeCacheEvictionListener(CacheEvictionListener listener)
removeCacheEvictionListener in interface CacheEvictionListenerSupportpublic int size()
ConcurrentDistributedMap
size in interface Map<K,V>size in class ConcurrentDistributedMap<K,V>public boolean isEmpty()
ConcurrentDistributedMap
isEmpty in interface Map<K,V>isEmpty in class ConcurrentDistributedMap<K,V>public Collection<Map.Entry<K,V>> getAllEntriesSnapshot()
ClusteredMap
getAllEntriesSnapshot in interface ClusteredMap<K,V>getAllEntriesSnapshot in class ConcurrentDistributedMap<K,V>public void initializeLocalCache()
initializeLocalCache in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic long localOnHeapSizeInBytes()
localOnHeapSizeInBytes in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic long localOffHeapSizeInBytes()
localOffHeapSizeInBytes in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic int localOnHeapSize()
localOnHeapSize in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic int localOffHeapSize()
localOffHeapSize in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic void destroyLocalCache()
destroyLocalCache in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic boolean containsKeyLocalOnHeap(Object key)
containsKeyLocalOnHeap in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic boolean containsKeyLocalOffHeap(Object key)
containsKeyLocalOffHeap in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic void setTargetMaxTotalCount(int targetMaxTotalCount)
setTargetMaxTotalCount in interface com.terracotta.toolkit.collections.InternalClusteredMap<K,V>setTargetMaxTotalCount in class ConcurrentDistributedMap<K,V>public void setMaxTTI(int maxTTI)
setMaxTTI in interface com.terracotta.toolkit.collections.InternalClusteredMap<K,V>setMaxTTI in class ConcurrentDistributedMap<K,V>public void setMaxTTL(int maxTTL)
setMaxTTL in interface com.terracotta.toolkit.collections.InternalClusteredMap<K,V>setMaxTTL in class ConcurrentDistributedMap<K,V>public void setMaxEntriesLocalHeap(int maxEntriesLocalHeap)
setMaxEntriesLocalHeap in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic void setMaxBytesLocalHeap(long maxBytesLocalHeap)
setMaxBytesLocalHeap in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic void setLocalCacheEnabled(boolean enabled)
setLocalCacheEnabled in interface com.terracotta.toolkit.collections.InternalLocallyCacheablepublic void recalculateLocalCacheSize(Object key)
recalculateLocalCacheSize in interface com.terracotta.toolkit.collections.InternalLocallyCacheable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||