public abstract class AbsCache extends Object implements ICache
ICache.NullClass
Modifier and Type | Field and Description |
---|---|
protected String |
cacheName |
MAX_EXPIRE_IN_LOCAL, NULL_OBJ
Constructor and Description |
---|
AbsCache(String cacheName) |
AbsCache(String cacheName,
Long timeToLiveSeconds,
Long timeToIdleSeconds) |
Modifier and Type | Method and Description |
---|---|
abstract Serializable |
_get(String key) |
Serializable |
get(String key)
根据key获取value
|
<T> T |
get(String key,
Class<T> clazz)
根据key获取value
|
String |
getCacheName() |
Long |
getTimeToIdleSeconds() |
Long |
getTimeToLiveSeconds() |
void |
setCacheName(String cacheName) |
void |
setTimeToIdleSeconds(Long timeToIdleSeconds) |
void |
setTimeToLiveSeconds(Long timeToLiveSeconds) |
protected String cacheName
public AbsCache(String cacheName)
public String getCacheName()
getCacheName
in interface ICache
public void setCacheName(String cacheName)
cacheName
- the cacheName to setpublic Long getTimeToLiveSeconds()
getTimeToLiveSeconds
in interface ICache
public void setTimeToLiveSeconds(Long timeToLiveSeconds)
public Long getTimeToIdleSeconds()
getTimeToIdleSeconds
in interface ICache
public void setTimeToIdleSeconds(Long timeToIdleSeconds)
public Serializable get(String key)
public abstract Serializable _get(String key)
Copyright © 2021. All rights reserved.