public class AerospikeCacheManager
extends org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
CacheManager implementation for Aerospike. By default AerospikeCaches
will be lazily initialized for each getCache(String) request unless a set of
predefined cache names is provided. 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.| Modifier and Type | Class and Description |
|---|---|
class |
AerospikeCacheManager.AerospikeSerializingCache |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_SET_NAME |
| Constructor and Description |
|---|
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames,
MappingAerospikeConverter aerospikeConverter)
Create a new
AerospikeCacheManager instance with the specified caches and
with the set name "aerospike". |
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames,
String setName,
MappingAerospikeConverter aerospikeConverter)
Create a new
AerospikeCacheManager instance with the specified caches and
with the specified set name. |
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
MappingAerospikeConverter aerospikeConverter)
Create a new
AerospikeCacheManager instance with no caches and with the
set name "aerospike". |
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
String setName,
MappingAerospikeConverter aerospikeConverter)
Create a new
AerospikeCacheManager instance with no caches and with the
specified set name. |
| Modifier and Type | Method and Description |
|---|---|
protected AerospikeCache |
createCache(String cacheName) |
protected org.springframework.cache.Cache |
decorateCache(org.springframework.cache.Cache cache) |
org.springframework.cache.Cache |
getCache(String name) |
protected org.springframework.cache.Cache |
getMissingCache(String cacheName) |
protected boolean |
isCacheAlreadyDecorated(org.springframework.cache.Cache cache) |
protected Collection<? extends org.springframework.cache.Cache> |
loadCaches() |
protected org.springframework.cache.Cache |
lookupAerospikeCache(String name) |
isTransactionAware, setTransactionAwareprotected static final String DEFAULT_SET_NAME
public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
MappingAerospikeConverter aerospikeConverter)
AerospikeCacheManager instance with no caches and with the
set name "aerospike".aerospikeClient - the AerospikeClient instance.aerospikeConverter - public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
String setName,
MappingAerospikeConverter aerospikeConverter)
AerospikeCacheManager instance with no caches and with the
specified set name.aerospikeClient - the AerospikeClient instance.setName - the set name.aerospikeConverter - public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames,
MappingAerospikeConverter aerospikeConverter)
AerospikeCacheManager instance with the specified caches and
with the set name "aerospike".aerospikeClient - the AerospikeClient instance.cacheNames - the default caches to create.aerospikeConverter - public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames,
String setName,
MappingAerospikeConverter aerospikeConverter)
AerospikeCacheManager instance with the specified caches and
with the specified set name.aerospikeClient - the AerospikeClient instance.cacheNames - the default caches to create.setName - the set name.aerospikeConverter - protected Collection<? extends org.springframework.cache.Cache> loadCaches()
loadCaches in class org.springframework.cache.support.AbstractCacheManagerprotected org.springframework.cache.Cache getMissingCache(String cacheName)
getMissingCache in class org.springframework.cache.support.AbstractCacheManagerprotected AerospikeCache createCache(String cacheName)
public org.springframework.cache.Cache getCache(String name)
getCache in interface org.springframework.cache.CacheManagergetCache in class org.springframework.cache.support.AbstractCacheManagerprotected org.springframework.cache.Cache lookupAerospikeCache(String name)
protected org.springframework.cache.Cache decorateCache(org.springframework.cache.Cache cache)
decorateCache in class org.springframework.cache.transaction.AbstractTransactionSupportingCacheManagerprotected boolean isCacheAlreadyDecorated(org.springframework.cache.Cache cache)
Copyright © 2011–2018 Aerospike Inc.. All rights reserved.