anthill.storage.impl
Class LRUQueryStorage
java.lang.Object
|
+--anthill.storage.impl.LRUKeyStorage
|
+--anthill.storage.impl.LRUQueryStorage
- All Implemented Interfaces:
- Clearable, GenericStorage, QueryStorage, ResourceManager, Storage
- Direct Known Subclasses:
- UrlStorage, UrlStorage
- public class LRUQueryStorage
- extends LRUKeyStorage
- implements QueryStorage
Implementation of an LRU based query storage. This is a wrapper class
for storing resources based on using a query to access the resources.
It inherits all methods from the LRUKeyStorage
,
but adds a method to retrieve resources based on a query.
- Version:
- $Revision: 1.6 $
- Author:
- Hein Meling
Method Summary |
void |
clear()
Restore the object to its initial state |
Resource[] |
getResources(Object query)
Return the resource associated with the specified query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAR_CONTROLLERNAME
public static final String PAR_CONTROLLERNAME
- The identifier of the configuration parameter
- See Also:
- Constant Field Values
LRUQueryStorage
public LRUQueryStorage(Factory factory,
String name)
- Parameters:
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration file
clear
public void clear()
- Restore the object to its initial state
- Specified by:
clear
in interface Clearable
- Overrides:
clear
in class LRUKeyStorage
getResources
public Resource[] getResources(Object query)
- Return the resource associated with the specified query.
- Specified by:
getResources
in interface QueryStorage
- Parameters:
query
- whose associated resource to retreive.
- Returns:
- resources found in the storage with which the
specified query matched.