Package org.apache.wss4j.common.cache
Class EHCacheReplayCache
java.lang.Object
org.apache.wss4j.common.cache.EHCacheReplayCache
- All Implemented Interfaces:
Closeable,AutoCloseable,ReplayCache
An in-memory EHCache implementation of the ReplayCache interface, that overflows to disk.
The default TTL is 60 minutes and the max TTL is 12 hours.
-
Constructor Summary
ConstructorsConstructorDescriptionEHCacheReplayCache(String key) EHCacheReplayCache(String key, Path diskstorePath) EHCacheReplayCache(String key, Path diskstorePath, long diskSize, long heapEntries, boolean persistent) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given identifier to the cache.voidAdd the given identifier to the cache to be cached for the given timevoidclose()booleanReturn true if the given identifier is contained in the cachevoidvoidvoid
-
Constructor Details
-
EHCacheReplayCache
- Throws:
WSSecurityException
-
EHCacheReplayCache
- Throws:
WSSecurityException
-
EHCacheReplayCache
public EHCacheReplayCache(String key, Path diskstorePath, long diskSize, long heapEntries, boolean persistent) throws WSSecurityException - Throws:
WSSecurityException
-
-
Method Details
-
add
Add the given identifier to the cache. It will be cached for a default amount of time.- Specified by:
addin interfaceReplayCache- Parameters:
identifier- The identifier to be added
-
add
Add the given identifier to the cache to be cached for the given time- Specified by:
addin interfaceReplayCache- Parameters:
identifier- The identifier to be addedexpiry- A custom expiry time for the identifier. Can be null in which case, the default expiry is used.
-
contains
Return true if the given identifier is contained in the cache- Specified by:
containsin interfaceReplayCache- Parameters:
identifier- The identifier to check
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
initComplete
public void initComplete() -
preShutdown
public void preShutdown() -
postShutdown
public void postShutdown()
-