ome.services.util.cache
Class DelegatingCache<K extends ome.model.IObject,V extends Serializable>

java.lang.Object
  extended by ome.services.util.cache.DelegatingCache<K,V>
All Implemented Interfaces:
Cache<K,V>
Direct Known Subclasses:
IdBackedCache

public class DelegatingCache<K extends ome.model.IObject,V extends Serializable>
extends Object
implements Cache<K,V>

Simple base Cache which delegates all methods to the Cache with which it is constructed. Good for subclassing other delegaters.

Since:
3.0-Beta4
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  Cache<K,V> cache
           
 
Constructor Summary
DelegatingCache(Cache<K,V> cache)
           
 
Method Summary
 V get(long id)
           
 List<Long> getKeys()
           
 Class<K> getType()
           
 void put(long id, V s)
           
 void reap()
           
 void remove(long id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected final Cache<K extends ome.model.IObject,V extends Serializable> cache
Constructor Detail

DelegatingCache

public DelegatingCache(Cache<K,V> cache)
Method Detail

get

public V get(long id)
Specified by:
get in interface Cache<K extends ome.model.IObject,V extends Serializable>

put

public void put(long id,
                V s)
Specified by:
put in interface Cache<K extends ome.model.IObject,V extends Serializable>

remove

public void remove(long id)
Specified by:
remove in interface Cache<K extends ome.model.IObject,V extends Serializable>

reap

public void reap()
Specified by:
reap in interface Cache<K extends ome.model.IObject,V extends Serializable>

getKeys

public List<Long> getKeys()
Specified by:
getKeys in interface Cache<K extends ome.model.IObject,V extends Serializable>

getType

public Class<K> getType()
Specified by:
getType in interface Cache<K extends ome.model.IObject,V extends Serializable>


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.