cn.dreampie.cache
类 CacheProvider

java.lang.Object
  继承者 cn.dreampie.cache.CacheProvider
直接已知子类:
EHCacheProvider, RedisProvider

public abstract class CacheProvider
extends Object

Abstract method to be sub-classed by various caching technologies.


字段摘要
static CacheProvider PROVIDER
           
 
构造方法摘要
CacheProvider()
           
 
方法摘要
 void addCache(String group, String key, Object cache)
          Adds item to cache.
abstract  void addCache(String group, String key, Object cache, int expired)
           
 void addCacheEventListener(CacheEventListener listener)
           
abstract  void doFlush(CacheEvent event)
           
 void flush(CacheEvent event)
          Flash cache.
abstract
<T> T
getCache(String group, String key)
          Returns a cached item.
 void removeAllCacheEventListeners()
           
abstract  void removeCache(String group, String key)
          remove item from cache.
 void removeCacheEventListener(CacheEventListener listener)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

PROVIDER

public static final CacheProvider PROVIDER
构造方法详细信息

CacheProvider

public CacheProvider()
方法详细信息

getCache

public abstract <T> T getCache(String group,
                               String key)
Returns a cached item. Can return null if not found.

参数:
group - group of caches - this is a name of a table for which query results are cached
key - key of the item.
返回:
a cached item. Can return null if not found.

addCache

public void addCache(String group,
                     String key,
                     Object cache)
Adds item to cache.

参数:
group - group name of cache.
key - key of the item.
cache - cache item to add to cache.

addCache

public abstract void addCache(String group,
                              String key,
                              Object cache,
                              int expired)

removeCache

public abstract void removeCache(String group,
                                 String key)
remove item from cache.

参数:
group - group name of cache.
key - key of the item.

doFlush

public abstract void doFlush(CacheEvent event)

flush

public final void flush(CacheEvent event)
Flash cache.

参数:
event - type of caches to flush.

addCacheEventListener

public final void addCacheEventListener(CacheEventListener listener)

removeCacheEventListener

public final void removeCacheEventListener(CacheEventListener listener)

removeAllCacheEventListeners

public final void removeAllCacheEventListeners()


Copyright © 2015. All rights reserved.