Class TestPortalCache<K extends Serializable,V>

java.lang.Object
com.liferay.portal.cache.BasePortalCache<K,V>
com.liferay.portal.cache.test.util.TestPortalCache<K,V>
All Implemented Interfaces:
com.liferay.portal.cache.LowLevelCache<K,V>, com.liferay.portal.kernel.cache.PortalCache<K,V>
Direct Known Subclasses:
ShardedTestPortalCache

public class TestPortalCache<K extends Serializable,V> extends com.liferay.portal.cache.BasePortalCache<K,V>
  • Field Summary

    Fields inherited from class com.liferay.portal.cache.BasePortalCache

    aggregatedPortalCacheListener

    Fields inherited from interface com.liferay.portal.kernel.cache.PortalCache

    DEFAULT_TIME_TO_LIVE
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestPortalCache(String portalCacheName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    protected ConcurrentMap<K,V>
     
     
     
    void
     

    Methods inherited from class com.liferay.portal.cache.BasePortalCache

    get, getPortalCacheManager, isMVCC, isSharded, put, put, putIfAbsent, putIfAbsent, registerPortalCacheListener, registerPortalCacheListener, remove, remove, replace, replace, replace, replace, unregisterPortalCacheListener, unregisterPortalCacheListeners

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestPortalCache

      public TestPortalCache(String portalCacheName)
  • Method Details

    • getKeys

      public List<K> getKeys()
    • getPortalCacheName

      public String getPortalCacheName()
    • removeAll

      public void removeAll()
    • doGet

      protected V doGet(K key)
      Specified by:
      doGet in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doPut

      protected void doPut(K key, V value, int timeToLive)
      Specified by:
      doPut in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doPutIfAbsent

      protected V doPutIfAbsent(K key, V value, int timeToLive)
      Specified by:
      doPutIfAbsent in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doRemove

      protected void doRemove(K key)
      Specified by:
      doRemove in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doRemove

      protected boolean doRemove(K key, V value)
      Specified by:
      doRemove in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doReplace

      protected V doReplace(K key, V value, int timeToLive)
      Specified by:
      doReplace in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • doReplace

      protected boolean doReplace(K key, V oldValue, V newValue, int timeToLive)
      Specified by:
      doReplace in class com.liferay.portal.cache.BasePortalCache<K extends Serializable,V>
    • getConcurrentMap

      protected ConcurrentMap<K,V> getConcurrentMap()