|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Storage
interface represents the resource storage
component of a nest. Resources maintained by a Storage
object may be retrieved by invoking the getResource()
method. Resources may be added to a storage by invoking methods
addAntResource()
and addClientResource()
.
The former method is invoked by ants through their associated
AntView
object, while the latter is invoked by nest
users.
Depending on the implementation, different storage policies may be adopted for resources inserted by ants and users. For example, ants resources may be handled with a LRU policy, while user resources may be stored permanently.
Storage
is one of the components of a nest; the
other are Manager
), RequestSet
,
Gate
and Trail
.
Storage
methods are invoked by AntView
objects to implement methods addResource()
and getResources()
. The exact behavior of
these methods depends on the implementation of Storage
.
Method Summary | |
void |
addAntResource(Resource resource)
Adds a resource to the storage. |
void |
addClientResource(Resource resource)
Add a resource to the storage. |
Resource[] |
getResources(java.lang.Object request)
Returns the set of resources stored locally which satisfy the request. |
Methods inherited from interface anthill.util.Clearable |
clear |
Method Detail |
public Resource[] getResources(java.lang.Object request)
null
value is returned.request
- the request to be satisfiedpublic void addAntResource(Resource resource)
resource
- the resource to be addedpublic void addClientResource(Resource resource)
resource
- the resource to be added
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |