|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.wsclient.cache.impl.WSCacheManager
public class WSCacheManager
Default implementation of the IWSCacheManager
interface
Field Summary | |
---|---|
protected WSClientConfig |
m_clientConfig
|
Constructor Summary | |
---|---|
WSCacheManager(WSClientConfig clientConfig)
Create a new WsCacheManager instance given the specified clientConfig object |
Method Summary | |
---|---|
void |
enableCache(boolean enabled)
Either enable or disable cache |
void |
flushAllCaches()
Flush all caches for all interfaces |
void |
flushCache(IWSProxyFactory factory)
Flush the cache associated with the specified factory |
WSLruCache |
getCache(IWSProxyFactory factory)
Obtain a Cache for a specific proxy factory This is mostly for testing purposes and you should not need to talk to directly to the WSLruCache |
IWSCacheKey |
getCacheKey(IWSClientSession session,
Method method,
Object[] args)
Generate a cache key based on the input information |
Object |
getCacheValue(IWSCacheKey cacheKey,
IWSProxyFactory factory)
Get the value stored in the cache for a given key |
boolean |
isEnabled()
Determine that the cache is enabled or disabled |
void |
putCacheValue(IWSCacheKey cacheKey,
Object value,
IWSProxyFactory factory)
Put the data into the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WSClientConfig m_clientConfig
Constructor Detail |
---|
public WSCacheManager(WSClientConfig clientConfig)
clientConfig
- configuration object containing IWSCacheManager configuration optionsMethod Detail |
---|
public IWSCacheKey getCacheKey(IWSClientSession session, Method method, Object[] args)
IWSCacheManager
getCacheKey
in interface IWSCacheManager
session
- the current sessionmethod
- the target methodargs
- the params for that method invocationpublic Object getCacheValue(IWSCacheKey cacheKey, IWSProxyFactory factory)
IWSCacheManager
getCacheValue
in interface IWSCacheManager
cacheKey
- see IWSCacheManager.getCacheKey(com.webmethods.caf.wsclient.session.IWSClientSession, java.lang.reflect.Method, Object[])
public void putCacheValue(IWSCacheKey cacheKey, Object value, IWSProxyFactory factory)
IWSCacheManager
putCacheValue
in interface IWSCacheManager
cacheKey
- the key generated by calls to IWSCacheManager.getCacheKey(com.webmethods.caf.wsclient.session.IWSClientSession, java.lang.reflect.Method, java.lang.Object[])
value
- the web service invoke resultsfactory
- the factory that created the proxy that invoked the webserviceIWSCacheManager.getCacheKey(com.webmethods.caf.wsclient.session.IWSClientSession, java.lang.reflect.Method, Object[])
public WSLruCache getCache(IWSProxyFactory factory)
IWSCacheManager
getCache
in interface IWSCacheManager
public void enableCache(boolean enabled)
IWSCacheManager
enableCache
in interface IWSCacheManager
public boolean isEnabled()
IWSCacheManager
isEnabled
in interface IWSCacheManager
public void flushCache(IWSProxyFactory factory)
IWSCacheManager
flushCache
in interface IWSCacheManager
public void flushAllCaches()
IWSCacheManager
flushAllCaches
in interface IWSCacheManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |