com.googlecode.jpattern.gwt.client.cache
Class NullCache

java.lang.Object
  extended by com.googlecode.jpattern.gwt.client.cache.NullCache
All Implemented Interfaces:
ICache

public class NullCache
extends Object
implements ICache

Author:
Francesco Cina 26/lug/2011

Constructor Summary
NullCache()
           
 
Method Summary
 int cacheSize()
          return the total number of objects hold by the cache
 Object get(String key)
          Return the object associated to the key if exists, null otherwise
<T> T
get(String key, Class<T> clazz)
          Return the object associated to the key if exists, null otherwise
 int getHits()
          return the total number of times an object has not be found in the cache
 int getMissing()
          return the total number of times an object has not be found in the cache
 int getTotalcalls()
          return the total number of request to get an object from the cache
 void put(String key, Object value)
          Put a new object in the cache
 void remove(String key)
          Remove an object from the cache
 
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

put

public void put(String key,
                Object value)
Description copied from interface: ICache
Put a new object in the cache

Specified by:
put in interface ICache

remove

public void remove(String key)
Description copied from interface: ICache
Remove an object from the cache

Specified by:
remove in interface ICache

get

public Object get(String key)
Description copied from interface: ICache
Return the object associated to the key if exists, null otherwise

Specified by:
get in interface ICache
Returns:

get

public <T> T get(String key,
                 Class<T> clazz)
Description copied from interface: ICache
Return the object associated to the key if exists, null otherwise

Specified by:
get in interface ICache
Returns:

cacheSize

public int cacheSize()
Description copied from interface: ICache
return the total number of objects hold by the cache

Specified by:
cacheSize in interface ICache
Returns:

getMissing

public int getMissing()
Description copied from interface: ICache
return the total number of times an object has not be found in the cache

Specified by:
getMissing in interface ICache
Returns:

getHits

public int getHits()
Description copied from interface: ICache
return the total number of times an object has not be found in the cache

Specified by:
getHits in interface ICache
Returns:

getTotalcalls

public int getTotalcalls()
Description copied from interface: ICache
return the total number of request to get an object from the cache

Specified by:
getTotalcalls in interface ICache
Returns:


Copyright © 2011. All Rights Reserved.