org.equanda.cache
Class EquandaCache<OBJECT>
java.lang.Object
org.equanda.cache.EquandaCache<OBJECT>
public abstract class EquandaCache<OBJECT>
- extends Object
Get an instance of the equanda used instance of the JBoss treecache, used for caching various information
- Author:
- Joachim Van der Auwera
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEARCH_FIRST_IN_DB
public static final int SEARCH_FIRST_IN_DB
- See Also:
- Constant Field Values
SEARCH_FIRST_IN_CACHE
public static final int SEARCH_FIRST_IN_CACHE
- See Also:
- Constant Field Values
EquandaCache
protected EquandaCache()
getObject
protected abstract OBJECT getObject(String key)
throws EquandaException
- Get value from DB when not in cache, should be overwritten by child classes
- Parameters:
key
- key
- Returns:
- value loaded from the non-cache location
- Throws:
EquandaException
- oops
setObject
protected void setObject(String key,
OBJECT value)
throws EquandaException
- Set value in DB
- Parameters:
key
- keyvalue
- value
- Throws:
EquandaException
- problems
get
public OBJECT get(String key)
throws EquandaException
- Throws:
EquandaException
get
protected OBJECT get(String key,
int depth)
throws EquandaException
- Throws:
EquandaException
set
public void set(String key,
OBJECT value)
throws EquandaException
- Throws:
EquandaException
update
public OBJECT update(String key)
throws EquandaException
- Throws:
EquandaException
Copyright © 2007-2009. All Rights Reserved.