org.terracotta.modules.ehcache.collections
Class SerializedToolkitCache<K,V extends Serializable>

java.lang.Object
  extended by org.terracotta.modules.ehcache.collections.SerializedToolkitCache<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, org.terracotta.toolkit.cache.ToolkitCache<K,V>, org.terracotta.toolkit.object.Destroyable, org.terracotta.toolkit.object.ToolkitObject, org.terracotta.toolkit.search.SearchableMap<K,V>

public class SerializedToolkitCache<K,V extends Serializable>
extends Object
implements org.terracotta.toolkit.cache.ToolkitCache<K,V>

An implementation of ToolkitCache that supports serializable keys


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SerializedToolkitCache(org.terracotta.toolkit.cache.ToolkitCache toolkitMap)
           
 
Method Summary
 void addListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
           
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock createLockForKey(K key)
           
 org.terracotta.toolkit.search.QueryBuilder createQueryBuilder()
           
 void destroy()
           
 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()
           
 V getQuiet(Object key)
           
 boolean isDestroyed()
           
 boolean isEmpty()
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 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 customMaxTTISeconds, int customMaxTTLSeconds)
           
 V remove(Object key)
           
 boolean remove(Object key, Object value)
           
 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 attrExtractor)
           
 void setConfigField(String name, Serializable value)
           
 int size()
           
 Collection<V> values()
           
 
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
 

Constructor Detail

SerializedToolkitCache

public SerializedToolkitCache(org.terracotta.toolkit.cache.ToolkitCache toolkitMap)
Method Detail

size

public int size()
Specified by:
size in interface Map<K,V extends Serializable>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<K,V extends Serializable>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V extends Serializable>

get

public V get(Object key)
Specified by:
get in interface Map<K,V extends Serializable>

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V extends Serializable>

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V extends Serializable>

putAll

public void putAll(Map<? extends K,? extends V> m)
Specified by:
putAll in interface Map<K,V extends Serializable>

clear

public void clear()
Specified by:
clear in interface Map<K,V extends Serializable>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V extends Serializable>

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

createLockForKey

public org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock createLockForKey(K key)
Specified by:
createLockForKey in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

removeNoReturn

public void removeNoReturn(Object key)
Specified by:
removeNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

putNoReturn

public void putNoReturn(K key,
                        V value)
Specified by:
putNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

getAll

public Map<K,V> getAll(Collection<? extends K> keys)
Specified by:
getAll in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

getConfiguration

public org.terracotta.toolkit.config.Configuration getConfiguration()
Specified by:
getConfiguration in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

setConfigField

public void setConfigField(String name,
                           Serializable value)
Specified by:
setConfigField in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<K,V extends Serializable>

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Specified by:
putIfAbsent in interface ConcurrentMap<K,V extends Serializable>

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V extends Serializable>

values

public Collection<V> values()
Specified by:
values in interface Map<K,V extends Serializable>

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface ConcurrentMap<K,V extends Serializable>

replace

public boolean replace(K key,
                       V oldValue,
                       V newValue)
Specified by:
replace in interface ConcurrentMap<K,V extends Serializable>

replace

public V replace(K key,
                 V value)
Specified by:
replace in interface ConcurrentMap<K,V extends Serializable>

getAllQuiet

public Map<K,V> getAllQuiet(Collection<K> keys)
Specified by:
getAllQuiet in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

getQuiet

public V getQuiet(Object key)
Specified by:
getQuiet in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

putNoReturn

public void putNoReturn(K key,
                        V value,
                        long createTimeInSecs,
                        int customMaxTTISeconds,
                        int customMaxTTLSeconds)
Specified by:
putNoReturn in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

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 extends Serializable>

addListener

public void addListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
Specified by:
addListener in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

removeListener

public void removeListener(org.terracotta.toolkit.cache.ToolkitCacheListener<K> listener)
Specified by:
removeListener in interface org.terracotta.toolkit.cache.ToolkitCache<K,V extends Serializable>

setAttributeExtractor

public void setAttributeExtractor(org.terracotta.toolkit.search.attribute.ToolkitAttributeExtractor attrExtractor)
Specified by:
setAttributeExtractor in interface org.terracotta.toolkit.search.SearchableMap<K,V extends Serializable>

createQueryBuilder

public org.terracotta.toolkit.search.QueryBuilder createQueryBuilder()
Specified by:
createQueryBuilder in interface org.terracotta.toolkit.search.SearchableMap<K,V extends Serializable>


Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.