Package uk.gov.gchq.gaffer.cache.impl
Class HashMapCacheService
- java.lang.Object
-
- uk.gov.gchq.gaffer.cache.impl.HashMapCacheService
-
- All Implemented Interfaces:
ICacheService
public class HashMapCacheService extends Object implements ICacheService
Simple implementation of theICacheServiceinterface which uses aHashMapCacheas the cache implementation.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJAVA_SERIALISATION_CACHEstatic StringSTATIC_CACHE
-
Constructor Summary
Constructors Constructor Description HashMapCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
ICache<K,V>getCache(String cacheName)Get the named cache from the cache service.voidinitialise(Properties properties)Initialise the cache service based on the suppliedPropertiesobject.voidshutdown()Shutdown the cache service.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.gov.gchq.gaffer.cache.ICacheService
clearCache, getAllKeysFromCache, getAllValuesFromCache, getFromCache, putInCache, putSafeInCache, removeFromCache, sizeOfCache
-
-
-
-
Field Detail
-
STATIC_CACHE
public static final String STATIC_CACHE
- See Also:
- Constant Field Values
-
JAVA_SERIALISATION_CACHE
public static final String JAVA_SERIALISATION_CACHE
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialise
public void initialise(Properties properties)
Description copied from interface:ICacheServiceInitialise the cache service based on the suppliedPropertiesobject.- Specified by:
initialisein interfaceICacheService- Parameters:
properties- the Properties object to apply to the cache service
-
shutdown
public void shutdown()
Description copied from interface:ICacheServiceShutdown the cache service.- Specified by:
shutdownin interfaceICacheService
-
getCache
public <K,V> ICache<K,V> getCache(String cacheName)
Description copied from interface:ICacheServiceGet the named cache from the cache service.- Specified by:
getCachein interfaceICacheService- Type Parameters:
K- The object type that acts as the key for the cacheV- The value that is stored in the cache- Parameters:
cacheName- the name of the cache to retrieve- Returns:
- the requested cache object
-
-