org.alfresco.repo.cache
Class NullCache

java.lang.Object
  extended by org.alfresco.repo.cache.NullCache
All Implemented Interfaces:
SimpleCache

public class NullCache
extends java.lang.Object
implements SimpleCache

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.


Constructor Summary
NullCache()
           
 
Method Summary
 void clear()
          NO-OP
 boolean contains(java.io.Serializable key)
          NO-OP
 java.lang.Object get(java.io.Serializable key)
          NO-OP
 java.util.Collection getKeys()
           
 void put(java.io.Serializable key, java.lang.Object value)
          NO-OP
 void remove(java.io.Serializable key)
          NO-OP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCache

public NullCache()
Method Detail

contains

public boolean contains(java.io.Serializable key)
NO-OP

Specified by:
contains in interface SimpleCache
Parameters:
key - the cache key to check up on
Returns:
Returns true if there is a cache entry, regardless of whether the value itself is null

getKeys

public java.util.Collection getKeys()
Specified by:
getKeys in interface SimpleCache

get

public java.lang.Object get(java.io.Serializable key)
NO-OP

Specified by:
get in interface SimpleCache
Returns:
Returns the value associated with the key. It will be null if the value is null or if the cache doesn't have an entry.

put

public void put(java.io.Serializable key,
                java.lang.Object value)
NO-OP

Specified by:
put in interface SimpleCache
Parameters:
key - the key against which to store the value
value - the value to store. null is allowed.

remove

public void remove(java.io.Serializable key)
NO-OP

Specified by:
remove in interface SimpleCache
Parameters:
key - the key value to remove

clear

public void clear()
NO-OP

Specified by:
clear in interface SimpleCache


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.