de.smartics.properties.spi.config.cache.guava
Class GuavaCacheManager

Package class diagram package GuavaCacheManager
java.lang.Object
  extended by de.smartics.properties.spi.config.cache.guava.GuavaCacheManager

public final class GuavaCacheManager
     
     
extends Object

The cache manager implementation using com.google.common.cache.Cache provided by guava-libraries.


Field Summary
static String INFINISPAN_DELEGATING_CACHE_CACHE_NAME
          The name of the key to retrieve the cache names.
 
Constructor Summary
GuavaCacheManager()
          Default constructor.
 
Method Summary
 void clear(String cacheName)
          Clears the cache with the given name.
 void clearAll()
          Removes all keys from all caches.
 void discard(String cacheName)
          Clears and stops the cache.
 Set<String> getCacheNames()
          Returns the set of cache names.
 de.smartics.properties.spi.config.cache.Cache getConfigurationsCache(String cacheName)
          Returns the cache with the given name.
 de.smartics.properties.spi.config.cache.Cache getInfinispanDelegatingCache()
          Returns the infinispan delegating cache.
 void stop(String cacheName)
          Stops the cache with the given name.
 void stopAll()
          Stops all caches, rendering the manager in a stopped state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINISPAN_DELEGATING_CACHE_CACHE_NAME

public static final String INFINISPAN_DELEGATING_CACHE_CACHE_NAME
The name of the key to retrieve the cache names.

Constant Field Value:
"INFINISPAN_DELEGATING_CACHE_CACHE"
Constructor Detail

GuavaCacheManager

public GuavaCacheManager()
Default constructor.

Method Detail

clearAll

public void clearAll()
Removes all keys from all caches.


clear

public void clear(String cacheName)
Clears the cache with the given name.

Parameters:
cacheName - the name of the cache to be cleared.

discard

public void discard(String cacheName)
Clears and stops the cache.

Parameters:
cacheName - the name of the cache to be cleared and stopped.

stopAll

public void stopAll()
Stops all caches, rendering the manager in a stopped state.


stop

public void stop(String cacheName)
Stops the cache with the given name.

Parameters:
cacheName - the name of the cache to stop.

getConfigurationsCache

public de.smartics.properties.spi.config.cache.Cache getConfigurationsCache(String cacheName)
Returns the cache with the given name. The cache is already started.

Parameters:
cacheName - the name of the cache to fetch.
Returns:
the requested cache already started.

getInfinispanDelegatingCache

public de.smartics.properties.spi.config.cache.Cache getInfinispanDelegatingCache()
Returns the infinispan delegating cache.

Returns:
the requested cache.

getCacheNames

public Set<String> getCacheNames()
Returns the set of cache names.

Returns:
the set of cache names.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.