Package org.alfresco.repo.cache
Class NullCache<K extends java.io.Serializable,V>
- java.lang.Object
-
- org.alfresco.repo.cache.NullCache<K,V>
-
- All Implemented Interfaces:
org.alfresco.repo.cache.SimpleCache<K,V>
public class NullCache<K extends java.io.Serializable,V> extends java.lang.Object implements org.alfresco.repo.cache.SimpleCache<K,V>A cache that does nothing - always. There are conditions under which code that expects to be caching, should not be. Using this cache, it becomes possible to configure a valid cache in whilst still ensuring that the actual caching is not performed.- Author:
- Derek Hulley
-
-
Constructor Summary
Constructors Constructor Description NullCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()NO-OPbooleancontains(K key)NO-OPVget(K key)NO-OPstatic <K extends java.io.Serializable,V>
NullCache<K,V>getInstance()java.util.Collection<K>getKeys()voidput(K key, V value)NO-OPvoidremove(K key)NO-OP
-
-
-
Method Detail
-
getInstance
public static final <K extends java.io.Serializable,V> NullCache<K,V> getInstance()
- Returns:
- Returns a singleton that can be used in any way - all operations are stateless
-
contains
public boolean contains(K key)
NO-OP
-
getKeys
public java.util.Collection<K> getKeys()
-
remove
public void remove(K key)
NO-OP
-
-