类 MemoryCacheEntity<K,V>

java.lang.Object
com.publiccms.common.cache.MemoryCacheEntity<K,V>
类型参数:
K -
V -
所有已实现的接口:
CacheEntity<K,V>, Serializable

public class MemoryCacheEntity<K,V> extends Object implements CacheEntity<K,V>, Serializable
MemoryCacheEntity
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • size

      private int size
    • log

      protected final transient org.apache.commons.logging.Log log
    • cachedMap

      private Map<K,CacheValue<V>> cachedMap
    • lock

      private ReentrantReadWriteLock lock
  • 构造器详细资料

    • MemoryCacheEntity

      public MemoryCacheEntity()
  • 方法详细资料

    • put

      public List<V> put(K key, V value)
      指定者:
      put 在接口中 CacheEntity<K,V>
      参数:
      key -
      value -
      返回:
      values list
    • put

      public void put(K key, V value, Long expiryInSeconds)
      指定者:
      put 在接口中 CacheEntity<K,V>
      参数:
      key -
      value -
      expiryInSeconds -
    • get

      public V get(K key)
      指定者:
      get 在接口中 CacheEntity<K,V>
      参数:
      key -
      返回:
      value
    • clear

      public List<V> clear(boolean recycling)
      指定者:
      clear 在接口中 CacheEntity<K,V>
      参数:
      recycling -
      返回:
      values list
    • remove

      public V remove(K key)
      指定者:
      remove 在接口中 CacheEntity<K,V>
      参数:
      key -
      返回:
      value
    • clearCache

      private List<V> clearCache()
    • setSize

      public void setSize(int size)
      参数:
      size -
    • contains

      public boolean contains(K key)
      指定者:
      contains 在接口中 CacheEntity<K,V>
      参数:
      key -
      返回:
      whether it is included
    • init

      public CacheEntity<K,V> init(String region, Properties properties)
      指定者:
      init 在接口中 CacheEntity<K,V>
      参数:
      region -
      properties -
      返回:
      entity