Interface IWSCacheManager
- All Known Implementing Classes:
WSCacheManager
public interface IWSCacheManager
Interface for implementing a manager for wsclient library caching
Items are split into the caches based upon:
- Session ID
- Host ID
- Method
- Arguments
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enableCache
(boolean enabled) Either enable or disable cachevoid
Flush all caches for all interfacesvoid
flushCache
(IWSProxyFactory factory) Flush the cache associated with the specified factorygetCache
(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 WSLruCachegetCacheKey
(IWSClientSession session, Method method, Object[] args) Generate a cache key based on the input informationgetCacheValue
(IWSCacheKey cacheKey, IWSProxyFactory factory) Get the value stored in the cache for a given keyboolean
Determine that the cache is enabled or disabledvoid
putCacheValue
(IWSCacheKey cacheKey, Object value, IWSProxyFactory factory) Put the data into the cache
-
Method Details
-
getCacheKey
Generate a cache key based on the input information- Parameters:
session
- the current sessionmethod
- the target methodargs
- the params for that method invocation
-
getCacheValue
Get the value stored in the cache for a given key- Parameters:
cacheKey
- seegetCacheKey(com.webmethods.caf.wsclient.session.IWSClientSession, java.lang.reflect.Method, Object[])
- Returns:
- the cached object if found, null otherwise
-
putCacheValue
Put the data into the cache- Parameters:
cacheKey
- the key generated by calls togetCacheKey(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 webservice- See Also:
-
getCache
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- Parameters:
factory
-
-
enableCache
void enableCache(boolean enabled) Either enable or disable cache- Parameters:
enabled
-
-
isEnabled
boolean isEnabled()Determine that the cache is enabled or disabled- Returns:
- true if enabled, false otherwise
-
flushCache
Flush the cache associated with the specified factory -
flushAllCaches
void flushAllCaches()Flush all caches for all interfaces
-