Spring Data Couchbase

org.springframework.data.couchbase.cache
Class CouchbaseCacheManager

java.lang.Object
  extended by org.springframework.cache.support.AbstractCacheManager
      extended by org.springframework.data.couchbase.cache.CouchbaseCacheManager
All Implemented Interfaces:
InitializingBean, CacheManager

public class CouchbaseCacheManager
extends AbstractCacheManager

The CouchbaseCacheManager orchestrates CouchbaseCache instances. Since more than one current CouchbaseClient connection can be used for caching, the CouchbaseCacheManager orchestrates and handles them for the Spring Cache abstraction layer.

Author:
Michael Nitschinger

Constructor Summary
CouchbaseCacheManager(HashMap<String,com.couchbase.client.CouchbaseClient> clients)
          Construct a new CouchbaseCacheManager.
 
Method Summary
 HashMap<String,com.couchbase.client.CouchbaseClient> getClients()
          Returns a Map of all CouchbaseClients with name.
protected  Collection<? extends Cache> loadCaches()
          Populates all caches.
 
Methods inherited from class org.springframework.cache.support.AbstractCacheManager
addCache, afterPropertiesSet, decorateCache, getCache, getCacheNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouchbaseCacheManager

public CouchbaseCacheManager(HashMap<String,com.couchbase.client.CouchbaseClient> clients)
Construct a new CouchbaseCacheManager.

Parameters:
clients - one ore more CouchbaseClients to reference.
Method Detail

getClients

public final HashMap<String,com.couchbase.client.CouchbaseClient> getClients()
Returns a Map of all CouchbaseClients with name.

Returns:
the actual CouchbaseClient instances.

loadCaches

protected final Collection<? extends Cache> loadCaches()
Populates all caches.

Specified by:
loadCaches in class AbstractCacheManager
Returns:
a collection of loaded caches.

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.