com.foxinmy.weixin4j.cache
Class CacheManager<T extends Cacheable>

java.lang.Object
  extended by com.foxinmy.weixin4j.cache.CacheManager<T>
Direct Known Subclasses:
TokenManager

public class CacheManager<T extends Cacheable>
extends Object

缓存管理类

Since:
JDK 1.7
Author:
jinyu(foxinmy@gmail.com)
See Also:

Constructor Summary
CacheManager(CacheCreator<T> cacheCreator, CacheStorager<T> cacheStorager)
           
 
Method Summary
 void clearCache()
          清除所有的缓存(请慎重)
 T evictCache()
          移除缓存
 T getCache()
          获取缓存对象
 T refreshCache()
          刷新缓存对象
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManager

public CacheManager(CacheCreator<T> cacheCreator,
                    CacheStorager<T> cacheStorager)
Method Detail

getCache

public T getCache()
                             throws WeixinException
获取缓存对象

Returns:
缓存对象
Throws:
WeixinException

refreshCache

public T refreshCache()
                                 throws WeixinException
刷新缓存对象

Returns:
缓存对象
Throws:
WeixinException

evictCache

public T evictCache()
移除缓存

Returns:
被移除的缓存对象

clearCache

public void clearCache()
清除所有的缓存(请慎重)



Copyright © 2014–2017. All rights reserved.