public class EHCacheTokenReplayCache extends Object implements TokenReplayCache<String>
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_KEY |
static long |
DEFAULT_TTL |
static long |
MAX_TTL |
| Constructor and Description |
|---|
EHCacheTokenReplayCache() |
EHCacheTokenReplayCache(Bus bus) |
EHCacheTokenReplayCache(String configFileURL) |
EHCacheTokenReplayCache(String configFileURL,
Bus bus) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getId(String id)
Return the given identifier if it is contained in the cache, otherwise null.
|
long |
getTTL()
Get the (default) TTL value in seconds
|
void |
putId(String id)
Add the given identifier to the cache.
|
void |
putId(String id,
long timeToLive)
Add the given identifier to the cache.
|
void |
setTTL(long newTtl)
Set a new (default) TTL value in seconds
|
public static final long DEFAULT_TTL
public static final long MAX_TTL
public static final String CACHE_KEY
public EHCacheTokenReplayCache()
public EHCacheTokenReplayCache(Bus bus)
public EHCacheTokenReplayCache(String configFileURL)
public void setTTL(long newTtl)
newTtl - a new (default) TTL value in secondspublic long getTTL()
public void putId(String id)
putId in interface TokenReplayCache<String>id - The identifier to be addedpublic void putId(String id, long timeToLive)
putId in interface TokenReplayCache<String>identifier - The identifier to be addedtimeToLive - The length of time to cache the Identifier in secondspublic String getId(String id)
getId in interface TokenReplayCache<String>id - The identifier to checkpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface TokenReplayCache<String>IOExceptionApache CXF