Class AerospikeCacheManager
java.lang.Object
org.springframework.cache.support.AbstractCacheManager
org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
org.springframework.data.aerospike.cache.AerospikeCacheManager
- All Implemented Interfaces:
InitializingBean,CacheManager
CacheManager implementation for Aerospike. By default AerospikeCaches will be lazily initialized for
each AbstractCacheManager.getCache(String) request unless a set of predefined cache names is provided. Setting
AbstractTransactionSupportingCacheManager.setTransactionAware(boolean) to true will force Caches to be decorated as
TransactionAwareCacheDecorator so values will only be written to the cache after successful commit of
surrounding transaction.- Author:
- Venil Noronha
-
Constructor Summary
ConstructorsConstructorDescriptionAerospikeCacheManager(com.aerospike.client.IAerospikeClient aerospikeClient, AerospikeConverter aerospikeConverter, AerospikeCacheConfiguration defaultCacheConfiguration) Create a newAerospikeCacheManagerinstance - Specifying a default cache configuration.AerospikeCacheManager(com.aerospike.client.IAerospikeClient aerospikeClient, AerospikeConverter aerospikeConverter, AerospikeCacheConfiguration defaultCacheConfiguration, Map<String, AerospikeCacheConfiguration> initialPerCacheConfiguration) Create a newAerospikeCacheManagerinstance - Specifying a default cache configuration and a map of caches (cache names) and matching configurations. -
Method Summary
Methods inherited from class org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
isTransactionAware, setTransactionAwareMethods inherited from class org.springframework.cache.support.AbstractCacheManager
afterPropertiesSet, getCache, getCacheNames, initializeCaches
-
Constructor Details
-
AerospikeCacheManager
public AerospikeCacheManager(com.aerospike.client.IAerospikeClient aerospikeClient, AerospikeConverter aerospikeConverter, AerospikeCacheConfiguration defaultCacheConfiguration) Create a newAerospikeCacheManagerinstance - Specifying a default cache configuration.- Parameters:
aerospikeClient- the instance that implementsIAerospikeClient.aerospikeConverter- the instance that implementsAerospikeConverter.defaultCacheConfiguration- the default cache configuration.
-
AerospikeCacheManager
public AerospikeCacheManager(com.aerospike.client.IAerospikeClient aerospikeClient, AerospikeConverter aerospikeConverter, AerospikeCacheConfiguration defaultCacheConfiguration, Map<String, AerospikeCacheConfiguration> initialPerCacheConfiguration) Create a newAerospikeCacheManagerinstance - Specifying a default cache configuration and a map of caches (cache names) and matching configurations.- Parameters:
aerospikeClient- the instance that implementsIAerospikeClient.aerospikeConverter- the instance that implementsAerospikeConverter.defaultCacheConfiguration- the default aerospike cache configuration.initialPerCacheConfiguration- a map of caches (cache names) and matching configurations.
-