public enum AuthDefaultStateCache extends Enum<AuthDefaultStateCache> implements AuthStateCache
| Enum Constant and Description |
|---|
INSTANCE
当前实例
|
| Modifier and Type | Method and Description |
|---|---|
void |
cache(String key,
String value)
存入缓存
|
void |
cache(String key,
String value,
long timeout)
存入缓存
|
boolean |
containsKey(String key)
是否存在key,如果对应key的value值已过期,也返回false
|
String |
get(String key)
获取缓存内容
|
static AuthDefaultStateCache |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AuthDefaultStateCache[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AuthDefaultStateCache INSTANCE
public static AuthDefaultStateCache[] values()
for (AuthDefaultStateCache c : AuthDefaultStateCache.values()) System.out.println(c);
public static AuthDefaultStateCache valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void cache(String key, String value)
cache in interface AuthStateCachekey - 缓存keyvalue - 缓存内容public void cache(String key, String value, long timeout)
cache in interface AuthStateCachekey - 缓存keyvalue - 缓存内容timeout - 指定缓存过期时间(毫秒)public String get(String key)
get in interface AuthStateCachekey - 缓存keypublic boolean containsKey(String key)
containsKey in interface AuthStateCachekey - 缓存keyCopyright © 2021. All rights reserved.