org.terracotta.modules.ehcache.store
Class ClusteredStoreBackend<K,V>
java.lang.Object
org.terracotta.modules.ehcache.store.ClusteredStoreBackend<K,V>
- All Implemented Interfaces:
- ConcurrentMap<K,V>, Map<K,V>, org.terracotta.toolkit.cache.ToolkitCache<K,V>, org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>, org.terracotta.toolkit.object.Destroyable, org.terracotta.toolkit.object.ToolkitObject, org.terracotta.toolkit.search.SearchableMap<K,V>
public class ClusteredStoreBackend<K,V>
- extends Object
- implements org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
|
Method Summary |
void |
addListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
|
void |
clear()
|
void |
clearLocalCache()
|
boolean |
containsKey(Object key)
|
boolean |
containsKeyLocalOffHeap(Object key)
|
boolean |
containsKeyLocalOnHeap(Object key)
|
boolean |
containsLocalKey(Object key)
|
boolean |
containsValue(Object value)
|
org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock |
createLockForKey(K key)
|
org.terracotta.toolkit.search.QueryBuilder |
createQueryBuilder()
|
void |
destroy()
|
void |
disposeLocally()
|
Set<Map.Entry<K,V>> |
entrySet()
|
V |
get(Object key)
|
Map<K,V> |
getAll(Collection<? extends K> keys)
|
Map<K,V> |
getAllQuiet(Collection<K> keys)
|
org.terracotta.toolkit.config.Configuration |
getConfiguration()
|
String |
getName()
|
Map<Object,Set<org.terracotta.toolkit.cluster.ClusterNode>> |
getNodesWithKeys(Set portableKeys)
|
V |
getQuiet(Object key)
|
boolean |
isBulkLoadEnabledInCluster()
|
boolean |
isBulkLoadEnabledInCurrentNode()
|
boolean |
isDestroyed()
|
boolean |
isEmpty()
|
Set<K> |
keySet()
|
Set<K> |
localKeySet()
|
int |
localOffHeapSize()
|
long |
localOffHeapSizeInBytes()
|
int |
localOnHeapSize()
|
long |
localOnHeapSizeInBytes()
|
int |
localSize()
|
V |
put(K key,
V value)
|
V |
put(K key,
V value,
int createTimeInSecs,
int customMaxTTISeconds,
int customMaxTTLSeconds)
|
void |
putAll(Map<? extends K,? extends V> m)
|
V |
putIfAbsent(K key,
V value)
|
V |
putIfAbsent(K key,
V value,
long createTimeInSecs,
int customMaxTTISeconds,
int customMaxTTLSeconds)
|
void |
putNoReturn(K key,
V value)
|
void |
putNoReturn(K key,
V value,
long createTimeInSecs,
int maxTTISeconds,
int maxTTLSeconds)
|
V |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
void |
removeAll(Set<K> keys)
|
void |
removeListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
|
void |
removeNoReturn(Object key)
|
V |
replace(K key,
V value)
|
boolean |
replace(K key,
V oldValue,
V newValue)
|
void |
setAttributeExtractor(org.terracotta.toolkit.search.attribute.ToolkitAttributeExtractor<K,V> extractor)
|
void |
setBulkLoadEnabledInCurrentNode(boolean enableBulkLoad)
|
void |
setConfigField(String name,
Serializable value)
|
int |
size()
|
V |
unlockedGet(Object k,
boolean quiet)
|
Map<K,V> |
unlockedGetAll(Collection<K> keys,
boolean quiet)
|
void |
unlockedPutNoReturn(K k,
V v,
int createTime,
int customTTI,
int customTTL)
|
void |
unlockedRemoveNoReturn(Object k)
|
V |
unsafeLocalGet(Object key)
|
Collection<V> |
values()
|
void |
waitUntilBulkLoadCompleteInCluster()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClusteredStoreBackend
public ClusteredStoreBackend(org.terracotta.toolkit.internal.ToolkitInternal toolkit,
org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V> cache,
BulkLoadShutdownHook bulkLoadShutdownHook,
StoreListener listener)
putIfAbsent
public V putIfAbsent(K key,
V value,
long createTimeInSecs,
int customMaxTTISeconds,
int customMaxTTLSeconds)
- Specified by:
putIfAbsent in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
put
public V put(K key,
V value,
int createTimeInSecs,
int customMaxTTISeconds,
int customMaxTTLSeconds)
- Specified by:
put in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
getQuiet
public V getQuiet(Object key)
- Specified by:
getQuiet in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
getAllQuiet
public Map<K,V> getAllQuiet(Collection<K> keys)
- Specified by:
getAllQuiet in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
putNoReturn
public void putNoReturn(K key,
V value,
long createTimeInSecs,
int maxTTISeconds,
int maxTTLSeconds)
- Specified by:
putNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
addListener
public void addListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
- Specified by:
addListener in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
removeListener
public void removeListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
- Specified by:
removeListener in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
removeNoReturn
public void removeNoReturn(Object key)
- Specified by:
removeNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
unsafeLocalGet
public V unsafeLocalGet(Object key)
- Specified by:
unsafeLocalGet in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
putNoReturn
public void putNoReturn(K key,
V value)
- Specified by:
putNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
localSize
public int localSize()
- Specified by:
localSize in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
localKeySet
public Set<K> localKeySet()
- Specified by:
localKeySet in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
containsLocalKey
public boolean containsLocalKey(Object key)
- Specified by:
containsLocalKey in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
getAll
public Map<K,V> getAll(Collection<? extends K> keys)
- Specified by:
getAll in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
getConfiguration
public org.terracotta.toolkit.config.Configuration getConfiguration()
- Specified by:
getConfiguration in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
setConfigField
public void setConfigField(String name,
Serializable value)
- Specified by:
setConfigField in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
containsValue
public boolean containsValue(Object value)
throws UnsupportedOperationException
- Specified by:
containsValue in interface Map<K,V>
- Throws:
UnsupportedOperationException
putIfAbsent
public V putIfAbsent(K key,
V value)
- Specified by:
putIfAbsent in interface ConcurrentMap<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface Map<K,V>
values
public Collection<V> values()
- Specified by:
values in interface Map<K,V>
remove
public boolean remove(Object key,
Object value)
- Specified by:
remove in interface ConcurrentMap<K,V>
replace
public boolean replace(K key,
V oldValue,
V newValue)
- Specified by:
replace in interface ConcurrentMap<K,V>
replace
public V replace(K key,
V value)
- Specified by:
replace in interface ConcurrentMap<K,V>
localOnHeapSizeInBytes
public long localOnHeapSizeInBytes()
- Specified by:
localOnHeapSizeInBytes in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
localOffHeapSizeInBytes
public long localOffHeapSizeInBytes()
- Specified by:
localOffHeapSizeInBytes in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
localOnHeapSize
public int localOnHeapSize()
- Specified by:
localOnHeapSize in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
localOffHeapSize
public int localOffHeapSize()
- Specified by:
localOffHeapSize in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
containsKeyLocalOnHeap
public boolean containsKeyLocalOnHeap(Object key)
- Specified by:
containsKeyLocalOnHeap in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
containsKeyLocalOffHeap
public boolean containsKeyLocalOffHeap(Object key)
- Specified by:
containsKeyLocalOffHeap in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
disposeLocally
public void disposeLocally()
- Specified by:
disposeLocally in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
createLockForKey
public org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock createLockForKey(K key)
- Specified by:
createLockForKey in interface org.terracotta.toolkit.cache.ToolkitCache<K,V>
size
public int size()
- Specified by:
size in interface Map<K,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Map<K,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey in interface Map<K,V>
get
public V get(Object key)
- Specified by:
get in interface Map<K,V>
put
public V put(K key,
V value)
- Specified by:
put in interface Map<K,V>
remove
public V remove(Object key)
- Specified by:
remove in interface Map<K,V>
putAll
public void putAll(Map<? extends K,? extends V> m)
- Specified by:
putAll in interface Map<K,V>
clear
public void clear()
- Specified by:
clear in interface Map<K,V>
keySet
public Set<K> keySet()
- Specified by:
keySet in interface Map<K,V>
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed in interface org.terracotta.toolkit.object.Destroyable
destroy
public void destroy()
- Specified by:
destroy in interface org.terracotta.toolkit.object.Destroyable
getName
public String getName()
- Specified by:
getName in interface org.terracotta.toolkit.object.ToolkitObject
getNodesWithKeys
public Map<Object,Set<org.terracotta.toolkit.cluster.ClusterNode>> getNodesWithKeys(Set portableKeys)
- Specified by:
getNodesWithKeys in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
unlockedPutNoReturn
public void unlockedPutNoReturn(K k,
V v,
int createTime,
int customTTI,
int customTTL)
- Specified by:
unlockedPutNoReturn in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
unlockedRemoveNoReturn
public void unlockedRemoveNoReturn(Object k)
- Specified by:
unlockedRemoveNoReturn in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
unlockedGet
public V unlockedGet(Object k,
boolean quiet)
- Specified by:
unlockedGet in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
clearLocalCache
public void clearLocalCache()
- Specified by:
clearLocalCache in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
setBulkLoadEnabledInCurrentNode
public void setBulkLoadEnabledInCurrentNode(boolean enableBulkLoad)
waitUntilBulkLoadCompleteInCluster
public void waitUntilBulkLoadCompleteInCluster()
throws InterruptedException
- Throws:
InterruptedException
isBulkLoadEnabledInCluster
public boolean isBulkLoadEnabledInCluster()
isBulkLoadEnabledInCurrentNode
public boolean isBulkLoadEnabledInCurrentNode()
setAttributeExtractor
public void setAttributeExtractor(org.terracotta.toolkit.search.attribute.ToolkitAttributeExtractor<K,V> extractor)
- Specified by:
setAttributeExtractor in interface org.terracotta.toolkit.search.SearchableMap<K,V>
removeAll
public void removeAll(Set<K> keys)
- Specified by:
removeAll in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
createQueryBuilder
public org.terracotta.toolkit.search.QueryBuilder createQueryBuilder()
- Specified by:
createQueryBuilder in interface org.terracotta.toolkit.search.SearchableMap<K,V>
unlockedGetAll
public Map<K,V> unlockedGetAll(Collection<K> keys,
boolean quiet)
- Specified by:
unlockedGetAll in interface org.terracotta.toolkit.internal.cache.ToolkitCacheInternal<K,V>
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.