Class DefaultCachingStrategy
java.lang.Object
de.iip_ecosphere.platform.connectors.DefaultCachingStrategy
- All Implemented Interfaces:
CachingStrategy
A default caching strategy.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceA functor indicating that two objects are considered the same. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckCache(Object data) Checks the cache if configured.booleancheckCache(String key, Object data) Checks a multi-cache if configured.private booleancheckCache(String key, Object data, DefaultCachingStrategy.ConsideredSame same) Checks the cache.voidClears the cache.voidDefines the actual cache mode.
-
Field Details
-
singleCache
-
cache
-
mode
-
-
Constructor Details
-
DefaultCachingStrategy
public DefaultCachingStrategy()
-
-
Method Details
-
setCacheMode
Description copied from interface:CachingStrategyDefines the actual cache mode.- Specified by:
setCacheModein interfaceCachingStrategy- Parameters:
mode- the actual cache mode
-
checkCache
Description copied from interface:CachingStrategyChecks the cache if configured.- Specified by:
checkCachein interfaceCachingStrategy- Parameters:
data- the data to send- Returns:
truefor sendingdata,falsefor not sendingdata
-
checkCache
Description copied from interface:CachingStrategyChecks a multi-cache if configured.- Specified by:
checkCachein interfaceCachingStrategy- Parameters:
key- a key into the cachedata- the data to send- Returns:
truefor sendingdata,falsefor not sendingdata
-
checkCache
Checks the cache.- Parameters:
key- the AAS id to consider caches for different AASdata- the data to sendsame- a functor checking the data- Returns:
truefor sendingdata,falsefor not sendingdata
-
clearCache
public void clearCache()Description copied from interface:CachingStrategyClears the cache.- Specified by:
clearCachein interfaceCachingStrategy
-