anthill.storage.impl
Class LRUQueryStorage

java.lang.Object
  |
  +--anthill.storage.impl.LRUKeyStorage
        |
        +--anthill.storage.impl.LRUQueryStorage
All Implemented Interfaces:
Clearable, GenericStorage, QueryStorage, Storage
Direct Known Subclasses:
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$
Author:
Hein Meling

Fields inherited from class anthill.storage.impl.LRUKeyStorage
list, storage
 
Fields inherited from interface anthill.storage.Storage
DOC_STORAGE, PHR_STORAGE, URL_STORAGE
 
Constructor Summary
LRUQueryStorage(Factory factory, java.lang.String storageName, java.lang.String controllerName)
           
 
Method Summary
 Resource[] getResources(java.lang.Object query)
          Return the resource associated with the specified query.
 
Methods inherited from class anthill.storage.impl.LRUKeyStorage
addResource, clear, containsResource, getCapacity, getRemainingCapacity, getResource, iterator, removeResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface anthill.storage.GenericStorage
addResource, containsResource, getCapacity, getRemainingCapacity, getResource, iterator, removeResource
 
Methods inherited from interface anthill.util.Clearable
clear
 

Constructor Detail

LRUQueryStorage

public LRUQueryStorage(Factory factory,
                       java.lang.String storageName,
                       java.lang.String controllerName)
Method Detail

getResources

public Resource[] getResources(java.lang.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.