cn.dreampie.security.cache
枚举 SessionCache

java.lang.Object
  继承者 java.lang.Enum<SessionCache>
      继承者 cn.dreampie.security.cache.SessionCache
所有已实现的接口:
Serializable, Comparable<SessionCache>

public enum SessionCache
extends Enum<SessionCache>

This is a main cache facade. It could be architected in the future to add more cache implementations besides OSCache.


枚举常量摘要
INSTANCE
           
 
方法摘要
 void add(String group, String key, Object value)
          Adds an item to cache.
 void add(String group, String key, Object value, int expired)
           
 void flush(String group)
          This method purges (removes) all caches associated with a table, if caching is enabled and a corresponding model is marked cached.
<T> T
get(String group, String key)
          Returns an item from cache, or null if nothing found.
 CacheProvider getCacheProvider()
           
static SessionCache instance()
          This class is a singleton, get an instance with this method.
 void remove(String group, String key)
           
static SessionCache valueOf(String name)
          返回带有指定名称的该类型的枚举常量。
static SessionCache[] values()
          按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。
 
从类 java.lang.Enum 继承的方法
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
从类 java.lang.Object 继承的方法
getClass, notify, notifyAll, wait, wait, wait
 

枚举常量详细信息

INSTANCE

public static final SessionCache INSTANCE
方法详细信息

values

public static SessionCache[] values()
按照声明该枚举类型的常量的顺序,返回 包含这些常量的数组。该方法可用于迭代 常量,如下所示:
for (SessionCache c : SessionCache.values())
    System.out.println(c);


valueOf

public static SessionCache valueOf(String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格。)

参数:
name - 要返回的枚举常量的名称。
返回:
返回带有指定名称的枚举常量
抛出:
如果该枚举类型没有带有指定名称的常量, - 则抛出 IllegalArgumentException

instance

public static SessionCache instance()
This class is a singleton, get an instance with this method.

返回:
one and only one instance of this class.

add

public void add(String group,
                String key,
                Object value)
Adds an item to cache. Expected some lists of objects returned from "select" queries.

参数:
group - - key of cache type principal or session.
key - - key of cache
value - object to cache.

add

public void add(String group,
                String key,
                Object value,
                int expired)

get

public <T> T get(String group,
                 String key)
Returns an item from cache, or null if nothing found.

参数:
group - - key of cache type principal or session.
key - - key of cache
返回:
cache object or null if nothing found.

remove

public void remove(String group,
                   String key)

flush

public void flush(String group)
This method purges (removes) all caches associated with a table, if caching is enabled and a corresponding model is marked cached.

参数:
group - key whose caches are to be purged.

getCacheProvider

public CacheProvider getCacheProvider()


Copyright © 2015. All rights reserved.