Class DefaultTransparentCacheService
- java.lang.Object
-
- tech.rsqn.cacheservice.referencetransparentcache.DefaultTransparentCacheService
-
- All Implemented Interfaces:
TransparentCacheService
public class DefaultTransparentCacheService extends java.lang.Object implements TransparentCacheService
-
-
Constructor Summary
Constructors Constructor Description DefaultTransparentCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectaroundInvalidateMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta)java.lang.ObjectaroundReadMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta)java.lang.ObjectaroundWriteMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta)longclear()longcount()voiddisableCaching()For testing and debuggingvoidenableCaching()For testing and debuggingjava.lang.StringgenerateCacheKey(java.lang.Class clazz, java.lang.Object... arguments)<T extends java.io.Serializable>
java.lang.StringgenerateCacheKey(T entity)java.lang.StringgenerateCacheKeyFromTemplate(org.aopalliance.intercept.MethodInvocation mi, java.lang.String keyTemplate)java.lang.StringgenerateParameterKey(java.lang.Object parameter)java.util.Map<java.lang.String,CacheService>getCaches()java.util.List<java.lang.Class>getSupportedTypes()voidsetCaches(java.util.Map<java.lang.String,CacheService> caches)voidsetDebugLogging(boolean debugLogging)voidsetDefaultCacheName(java.lang.String defaultCacheName)voidsetKeyGenerators(java.util.List<CacheKeyGenerator> keyGenerators)voidsetParameterKeyGenerators(java.util.List<ParameterKeyGenerator> parameterKeyGenerators)voidsetSupportParameterNameDiscovery(boolean supportParameterNameDiscovery)
-
-
-
Method Detail
-
setCaches
public void setCaches(java.util.Map<java.lang.String,CacheService> caches)
-
getCaches
public java.util.Map<java.lang.String,CacheService> getCaches()
- Specified by:
getCachesin interfaceTransparentCacheService
-
setSupportParameterNameDiscovery
public void setSupportParameterNameDiscovery(boolean supportParameterNameDiscovery)
-
disableCaching
public void disableCaching()
For testing and debugging
-
enableCaching
public void enableCaching()
For testing and debugging
-
setDefaultCacheName
public void setDefaultCacheName(java.lang.String defaultCacheName)
-
setDebugLogging
public void setDebugLogging(boolean debugLogging)
-
setKeyGenerators
public void setKeyGenerators(java.util.List<CacheKeyGenerator> keyGenerators)
-
setParameterKeyGenerators
public void setParameterKeyGenerators(java.util.List<ParameterKeyGenerator> parameterKeyGenerators)
-
count
public long count()
- Specified by:
countin interfaceTransparentCacheService
-
clear
public long clear()
- Specified by:
clearin interfaceTransparentCacheService
-
getSupportedTypes
public java.util.List<java.lang.Class> getSupportedTypes()
- Specified by:
getSupportedTypesin interfaceTransparentCacheService
-
generateParameterKey
public java.lang.String generateParameterKey(java.lang.Object parameter)
- Specified by:
generateParameterKeyin interfaceTransparentCacheService
-
generateCacheKey
public java.lang.String generateCacheKey(java.lang.Class clazz, java.lang.Object... arguments)- Specified by:
generateCacheKeyin interfaceTransparentCacheService
-
generateCacheKeyFromTemplate
public java.lang.String generateCacheKeyFromTemplate(org.aopalliance.intercept.MethodInvocation mi, java.lang.String keyTemplate)
-
generateCacheKey
public <T extends java.io.Serializable> java.lang.String generateCacheKey(T entity)
- Specified by:
generateCacheKeyin interfaceTransparentCacheService
-
aroundWriteMethodInvocation
public java.lang.Object aroundWriteMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta) throws java.lang.Throwable- Specified by:
aroundWriteMethodInvocationin interfaceTransparentCacheService- Throws:
java.lang.Throwable
-
aroundReadMethodInvocation
public java.lang.Object aroundReadMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta) throws java.lang.Throwable- Specified by:
aroundReadMethodInvocationin interfaceTransparentCacheService- Throws:
java.lang.Throwable
-
aroundInvalidateMethodInvocation
public java.lang.Object aroundInvalidateMethodInvocation(org.aopalliance.intercept.MethodInvocation invocation, InterceptorMetadata meta) throws java.lang.Throwable- Specified by:
aroundInvalidateMethodInvocationin interfaceTransparentCacheService- Throws:
java.lang.Throwable
-
-