ome.services.util.cache
Class DiskCache<K extends ome.model.IObject,V extends Serializable>
java.lang.Object
ome.services.util.cache.DiskCache<K,V>
- All Implemented Interfaces:
- Cache<K,V>
public class DiskCache<K extends ome.model.IObject,V extends Serializable>
- extends Object
- implements Cache<K,V>
Disk cache which is keyed to a particular type.
Possible to wrap with IdBackedStore
to have elements removed if the
backing type is also removed.
- Since:
- 3.0-Beta4
- Author:
- Josh Moore, josh at glencoesoftware.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DiskCache
public DiskCache(LocalQuery query,
net.sf.ehcache.CacheManager manager,
String name,
File dataDir,
Class<K> objectType)
getType
public Class<K> getType()
- Specified by:
getType
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>
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>
OmeroJava Api
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.