Liferay 7.0-ce-m3

com.liferay.portal.cache.memory
Class MemoryPortalCache<K extends Serializable,V>

java.lang.Object
  extended by com.liferay.portal.kernel.cache.AbstractPortalCache<K,V>
      extended by com.liferay.portal.cache.memory.MemoryPortalCache<K,V>
All Implemented Interfaces:
LowLevelCache<K,V>, PortalCache<K,V>

public class MemoryPortalCache<K extends Serializable,V>
extends AbstractPortalCache<K,V>


Field Summary
 
Fields inherited from class com.liferay.portal.kernel.cache.AbstractPortalCache
aggregatedCacheListener
 
Fields inherited from interface com.liferay.portal.kernel.cache.PortalCache
DEFAULT_TIME_TO_LIVE
 
Constructor Summary
MemoryPortalCache(PortalCacheManager<K,V> portalCacheManager, String name, int initialCapacity)
           
 
Method Summary
 void destroy()
           
protected  V doGet(K key)
           
protected  void doPut(K key, V value, int timeToLive)
           
protected  V doPutIfAbsent(K key, V value, int timeToLive)
           
protected  void doRemove(K key)
           
protected  boolean doRemove(K key, V value)
           
protected  V doReplace(K key, V value, int timeToLive)
           
protected  boolean doReplace(K key, V oldValue, V newValue, int timeToLive)
           
 List<K> getKeys()
           
 String getName()
           
 void removeAll()
           
 
Methods inherited from class com.liferay.portal.kernel.cache.AbstractPortalCache
get, getPortalCacheManager, put, put, putIfAbsent, putIfAbsent, registerCacheListener, registerCacheListener, remove, remove, replace, replace, replace, replace, unregisterCacheListener, unregisterCacheListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryPortalCache

public MemoryPortalCache(PortalCacheManager<K,V> portalCacheManager,
                         String name,
                         int initialCapacity)
Method Detail

destroy

public void destroy()

getKeys

public List<K> getKeys()

getName

public String getName()

removeAll

public void removeAll()

doGet

protected V doGet(K key)
Specified by:
doGet in class AbstractPortalCache<K extends Serializable,V>

doPut

protected void doPut(K key,
                     V value,
                     int timeToLive)
Specified by:
doPut in class AbstractPortalCache<K extends Serializable,V>

doPutIfAbsent

protected V doPutIfAbsent(K key,
                          V value,
                          int timeToLive)
Specified by:
doPutIfAbsent in class AbstractPortalCache<K extends Serializable,V>

doRemove

protected void doRemove(K key)
Specified by:
doRemove in class AbstractPortalCache<K extends Serializable,V>

doRemove

protected boolean doRemove(K key,
                           V value)
Specified by:
doRemove in class AbstractPortalCache<K extends Serializable,V>

doReplace

protected V doReplace(K key,
                      V value,
                      int timeToLive)
Specified by:
doReplace in class AbstractPortalCache<K extends Serializable,V>

doReplace

protected boolean doReplace(K key,
                            V oldValue,
                            V newValue,
                            int timeToLive)
Specified by:
doReplace in class AbstractPortalCache<K extends Serializable,V>

Liferay 7.0-ce-m3