public class AerospikeCacheManager extends 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)
Create a new
AerospikeCacheManager instance with no caches and with the
set name "aerospike". |
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames)
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)
Create a new
AerospikeCacheManager instance with the specified caches and
with the specified set name. |
AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
String setName)
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 Cache |
decorateCache(Cache cache) |
Cache |
getCache(String name) |
protected Cache |
getMissingCache(String cacheName) |
protected boolean |
isCacheAlreadyDecorated(Cache cache) |
protected Collection<? extends Cache> |
loadCaches() |
protected Cache |
lookupAerospikeCache(String name) |
isTransactionAware, setTransactionAwareaddCache, afterPropertiesSet, getCacheNames, initializeCaches, lookupCacheprotected static final String DEFAULT_SET_NAME
public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient)
AerospikeCacheManager instance with no caches and with the
set name "aerospike".aerospikeClient - the AerospikeClient instance.public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
String setName)
AerospikeCacheManager instance with no caches and with the
specified set name.aerospikeClient - the AerospikeClient instance.setName - the set name.public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames)
AerospikeCacheManager instance with the specified caches and
with the set name "aerospike".aerospikeClient - the AerospikeClient instance.cacheNames - the default caches to create.public AerospikeCacheManager(com.aerospike.client.AerospikeClient aerospikeClient,
Collection<String> cacheNames,
String setName)
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.protected Collection<? extends Cache> loadCaches()
loadCaches in class AbstractCacheManagerprotected Cache getMissingCache(String cacheName)
getMissingCache in class AbstractCacheManagerprotected AerospikeCache createCache(String cacheName)
public Cache getCache(String name)
getCache in interface CacheManagergetCache in class AbstractCacheManagerprotected Cache decorateCache(Cache cache)
decorateCache in class AbstractTransactionSupportingCacheManagerprotected boolean isCacheAlreadyDecorated(Cache cache)
Copyright © 2011-2016–2017 Aerospike Inc.. All rights reserved.