de.smartics.properties.spi.config.cache
Class AmnesiaCacheManager

Package class diagram package AmnesiaCacheManager
java.lang.Object
  extended by de.smartics.properties.spi.config.cache.AmnesiaCacheManager
All Implemented Interfaces:
CacheManager

@ThreadSafe
public class AmnesiaCacheManager
     
     
extends Object
implements CacheManager

The cache manager implementation for a fake cache, that does nothing.


Constructor Summary
AmnesiaCacheManager()
          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.
 Cache<?,?> getConfigurationsCache(String cacheName)
          Returns the cache with the given name.
 Cache<?,?> getPropertiesCache(String cacheName)
          Returns the cache with the given name.
 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
 

Constructor Detail

AmnesiaCacheManager

public AmnesiaCacheManager()
Default constructor.

Method Detail

clearAll

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

Specified by:
clearAll in interface CacheManager

clear

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

Specified by:
clear in interface CacheManager
Parameters:
cacheName - the name of the cache to be cleared.

discard

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

Specified by:
discard in interface CacheManager
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.

Specified by:
stopAll in interface CacheManager

stop

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

Specified by:
stop in interface CacheManager
Parameters:
cacheName - the name of the cache to stop.

getPropertiesCache

public final Cache<?,?> getPropertiesCache(String cacheName)
Returns the cache with the given name. The cache is already started.

Specified by:
getPropertiesCache in interface CacheManager
Parameters:
cacheName - the name of the cache to fetch.
Returns:
the requested cache already started.

getConfigurationsCache

public final Cache<?,?> getConfigurationsCache(String cacheName)
Returns the cache with the given name. The cache is already started.

Specified by:
getConfigurationsCache in interface CacheManager
Parameters:
cacheName - the name of the cache to fetch.
Returns:
the requested cache already started.

getCacheNames

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

Specified by:
getCacheNames in interface CacheManager
Returns:
the set of cache names.


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