Package org.apache.cxf.xkms.cache
Class EHCacheXKMSClientCache
- java.lang.Object
-
- org.apache.cxf.xkms.cache.EHCacheXKMSClientCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BusLifeCycleListener,XKMSClientCache
public class EHCacheXKMSClientCache extends Object implements XKMSClientCache, BusLifeCycleListener
An in-memory EHCache implementation of the XKMSClientCache interface.
-
-
Constructor Summary
Constructors Constructor Description EHCacheXKMSClientCache()EHCacheXKMSClientCache(Bus cxfBus)EHCacheXKMSClientCache(Bus cxfBus, Path diskstorePath, long diskSize, long heapEntries, boolean persistent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()XKMSCacheTokenget(String key)Get an XKMSCacheToken from the cache matching the given key.voidinitComplete()Invoked when theBushas been initialized.voidpostShutdown()Invoked after theBusis shutdown.voidpreShutdown()Invoked before theBusis shutdown.voidput(String key, XKMSCacheToken cacheToken)Store an XKMSCacheToken in the Cache using the given key
-
-
-
Constructor Detail
-
EHCacheXKMSClientCache
public EHCacheXKMSClientCache() throws XKMSClientCacheException- Throws:
XKMSClientCacheException
-
EHCacheXKMSClientCache
public EHCacheXKMSClientCache(Bus cxfBus) throws XKMSClientCacheException
- Throws:
XKMSClientCacheException
-
EHCacheXKMSClientCache
public EHCacheXKMSClientCache(Bus cxfBus, Path diskstorePath, long diskSize, long heapEntries, boolean persistent) throws XKMSClientCacheException
- Throws:
XKMSClientCacheException
-
-
Method Detail
-
put
public void put(String key, XKMSCacheToken cacheToken)
Store an XKMSCacheToken in the Cache using the given key- Specified by:
putin interfaceXKMSClientCache
-
get
public XKMSCacheToken get(String key)
Get an XKMSCacheToken from the cache matching the given key. Returns null if there is no such XKMSCacheToken in the cache.- Specified by:
getin interfaceXKMSClientCache
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceXKMSClientCache
-
initComplete
public void initComplete()
Description copied from interface:BusLifeCycleListenerInvoked when theBushas been initialized.- Specified by:
initCompletein interfaceBusLifeCycleListener
-
preShutdown
public void preShutdown()
Description copied from interface:BusLifeCycleListenerInvoked before theBusis shutdown.- Specified by:
preShutdownin interfaceBusLifeCycleListener
-
postShutdown
public void postShutdown()
Description copied from interface:BusLifeCycleListenerInvoked after theBusis shutdown.- Specified by:
postShutdownin interfaceBusLifeCycleListener
-
-