public class EHCacheTokenReplayCache extends Object implements TokenReplayCache<String>
Constructor and Description |
---|
EHCacheTokenReplayCache() |
EHCacheTokenReplayCache(Bus bus) |
EHCacheTokenReplayCache(String configFile) |
EHCacheTokenReplayCache(String configFile,
Bus bus) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
contains(String identifier)
Return true if the given identifier is contained in the cache
|
void |
putId(String identifier)
Add the given identifier to the cache.
|
void |
putId(String identifier,
Instant expiry)
Add the given identifier to the cache to be cached for the given time
|
public static final String CACHE_KEY
public EHCacheTokenReplayCache() throws IllegalAccessException, InstantiationException, ClassNotFoundException
public EHCacheTokenReplayCache(Bus bus) throws IllegalAccessException, InstantiationException, ClassNotFoundException
public EHCacheTokenReplayCache(String configFile) throws IllegalAccessException, InstantiationException, ClassNotFoundException
public EHCacheTokenReplayCache(String configFile, Bus bus) throws IllegalAccessException, ClassNotFoundException, InstantiationException
public void putId(String identifier)
putId
in interface TokenReplayCache<String>
identifier
- The identifier to be addedpublic void putId(String identifier, Instant expiry)
putId
in interface TokenReplayCache<String>
identifier
- The identifier to be addedexpiry
- A custom expiry time for the identifier. Can be null in which case, the default expiry is used.public boolean contains(String identifier)
contains
in interface TokenReplayCache<String>
identifier
- The identifier to checkpublic void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface TokenReplayCache<String>
Apache CXF