|
P-Grid v2.0a2 API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Storage
Defines the operations that the storage layer supports. It includes standard data (search, insert, delete, update) operations and registration of callbacks associated with them.
| Method Summary | |
|---|---|
void |
addStorageListener(StorageListener listener,
Type type)
Register a listener of events related to data items. |
void |
delete(Collection items)
Remove the data items with given Ds. |
Collection |
getLocalDataItems()
Get collection of the local data items. |
void |
insert(Collection items)
Store the data items into the network |
void |
search(Query query,
SearchListener listener)
Search the network for matching items. |
void |
shutdown()
Shutdowns the storage service. |
void |
update(Collection items)
Inserts the dataitems int the network, if the items with such ID's already exist, they will be rewritten |
| Method Detail |
|---|
void addStorageListener(StorageListener listener,
Type type)
listener - the listener to registertype - the type of data items that the listener is interested invoid delete(Collection items)
items - data items to be removedvoid insert(Collection items)
items - the DataItems to insertCollection getLocalDataItems()
void search(Query query,
SearchListener listener)
throws NoSuchTypeException,
NoRouteToKeyException
query - the query used to specify the searchlistener - an object to notify when results arrive
NoSuchTypeException - if the provided Type is unknown.
NoRouteToKeyException - if the query cannot be routed to a responsible peer.void update(Collection items)
items - the collection of data itemsvoid shutdown()
|
P-Grid v2.0a2 API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||