org.activemath.content.mediator
Class QueryCache
java.lang.Object
org.activemath.content.mediator.QueryCache
- All Implemented Interfaces:
- CacheControl
public class QueryCache
- extends Object
- implements CacheControl
A Cache for storing the result set of queries posed to the
mediator.
CACHE_ID
public static final String CACHE_ID
- See Also:
- Constant Field Values
QueryCache
public QueryCache()
getInstance
public static QueryCache getInstance()
get
public Set get(KBQuery query)
- Returns the resulting items of the given query.
- Parameters:
kbQuery -
- Returns:
- The Set of items corresponding to the given query. If there is
no such query in the cacheForExpandedQueries, null is returned.
getFromIncomingCache
public Set getFromIncomingCache(KBQuery query)
add
public boolean add(KBQuery query,
Set result)
- Adds an entry to the cacheForExpandedQueries.
- Parameters:
kbQuery - result -
- Returns:
- true if the entry is stored, false otherwise
addInIncomingCache
public boolean addInIncomingCache(KBQuery query,
Set result)
toString
public String toString()
- Overrides:
toString in class Object
remove
public void remove(String string)
- Not implemented
- Specified by:
remove in interface CacheControl
- See Also:
CacheControl.remove(java.lang.String)
clear
public void clear()
- Specified by:
clear in interface CacheControl
- See Also:
CacheControl.clear()
getCacheInfo
public CacheInfo getCacheInfo()
- Specified by:
getCacheInfo in interface CacheControl
- See Also:
CacheControl.getCacheInfo()
getCacheInfo2
public CacheInfo getCacheInfo2()