org.axonframework.common
Class NoCache

java.lang.Object
  extended by org.axonframework.common.NoCache
All Implemented Interfaces:
Map, net.sf.jsr107cache.Cache

public final class NoCache
extends Object
implements net.sf.jsr107cache.Cache

Cache implementation that does absolutely nothing. Objects aren't cached, making it a special case implementation for the case when caching is disabled.

Since:
0.3
Author:
Allard Buijze

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static NoCache INSTANCE
          Creates a singleton reference the the NoCache implementation.
 
Method Summary
 void addListener(net.sf.jsr107cache.CacheListener listener)
          
 void clear()
          
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 Set entrySet()
          
 void evict()
          
 Object get(Object key)
          
 Map getAll(Collection keys)
          
 net.sf.jsr107cache.CacheEntry getCacheEntry(Object key)
          
 net.sf.jsr107cache.CacheStatistics getCacheStatistics()
          
 boolean isEmpty()
          
 Set keySet()
          
 void load(Object key)
          
 void loadAll(Collection keys)
          
 Object peek(Object key)
          
 Object put(Object key, Object value)
          
 void putAll(Map t)
          
 Object remove(Object key)
          
 void removeListener(net.sf.jsr107cache.CacheListener listener)
          
 int size()
          
 Collection values()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jsr107cache.Cache
equals, hashCode
 

Field Detail

INSTANCE

public static final NoCache INSTANCE
Creates a singleton reference the the NoCache implementation.

Method Detail

containsKey

public boolean containsKey(Object key)

Specified by:
containsKey in interface Map
Specified by:
containsKey in interface net.sf.jsr107cache.Cache

containsValue

public boolean containsValue(Object value)

Specified by:
containsValue in interface Map
Specified by:
containsValue in interface net.sf.jsr107cache.Cache

entrySet

public Set entrySet()

Specified by:
entrySet in interface Map
Specified by:
entrySet in interface net.sf.jsr107cache.Cache

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map
Specified by:
isEmpty in interface net.sf.jsr107cache.Cache

keySet

public Set keySet()

Specified by:
keySet in interface Map
Specified by:
keySet in interface net.sf.jsr107cache.Cache

putAll

public void putAll(Map t)

Specified by:
putAll in interface Map
Specified by:
putAll in interface net.sf.jsr107cache.Cache

size

public int size()

Specified by:
size in interface Map
Specified by:
size in interface net.sf.jsr107cache.Cache

values

public Collection values()

Specified by:
values in interface Map
Specified by:
values in interface net.sf.jsr107cache.Cache

get

public Object get(Object key)

Specified by:
get in interface Map
Specified by:
get in interface net.sf.jsr107cache.Cache

getAll

public Map getAll(Collection keys)
           throws net.sf.jsr107cache.CacheException

Specified by:
getAll in interface net.sf.jsr107cache.Cache
Throws:
net.sf.jsr107cache.CacheException

load

public void load(Object key)
          throws net.sf.jsr107cache.CacheException

Specified by:
load in interface net.sf.jsr107cache.Cache
Throws:
net.sf.jsr107cache.CacheException

loadAll

public void loadAll(Collection keys)
             throws net.sf.jsr107cache.CacheException

Specified by:
loadAll in interface net.sf.jsr107cache.Cache
Throws:
net.sf.jsr107cache.CacheException

peek

public Object peek(Object key)

Specified by:
peek in interface net.sf.jsr107cache.Cache

put

public Object put(Object key,
                  Object value)

Specified by:
put in interface Map
Specified by:
put in interface net.sf.jsr107cache.Cache

getCacheEntry

public net.sf.jsr107cache.CacheEntry getCacheEntry(Object key)

Specified by:
getCacheEntry in interface net.sf.jsr107cache.Cache

getCacheStatistics

public net.sf.jsr107cache.CacheStatistics getCacheStatistics()

Specified by:
getCacheStatistics in interface net.sf.jsr107cache.Cache

remove

public Object remove(Object key)

Specified by:
remove in interface Map
Specified by:
remove in interface net.sf.jsr107cache.Cache

clear

public void clear()

Specified by:
clear in interface Map
Specified by:
clear in interface net.sf.jsr107cache.Cache

evict

public void evict()

Specified by:
evict in interface net.sf.jsr107cache.Cache

addListener

public void addListener(net.sf.jsr107cache.CacheListener listener)

Specified by:
addListener in interface net.sf.jsr107cache.Cache

removeListener

public void removeListener(net.sf.jsr107cache.CacheListener listener)

Specified by:
removeListener in interface net.sf.jsr107cache.Cache


Copyright © 2010-2012. All Rights Reserved.