|
P-Grid v2.0a2 API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TypeHandler
Used to define types of data items to store. No particular operations are defined; however, implementers are encouraged to provide consistent implementations of java.land.Object methods, including equals and hashCode, so that different types can be distinguished.
| Method Summary | |
|---|---|
DataItem |
createDataItem()
Create a DataItem instance compatible with the Storage implementation. |
DataItem |
createDataItem(GUID guid,
Key key,
Peer host,
Object data)
Create a DataItem instance compatible with the Storage implementation. |
DataItem |
createDataItem(Object data)
Create a DataItem instance compatible with the Storage implementation. |
Key |
generateKey(Object obj)
Generate a Key instance compatible with the P2P implementation. |
KeyRange |
generateKeyRange(Object lowerBound,
Object higherBound)
Generate a KeyRange instance compatible with the P2P implementation. |
void |
handleLocalSearch(Query query,
SearchListener listener)
Searches localy for all dataitems matching the query query |
String |
submitSearchHigherBoundValue(Query query)
Construct the string out of the higherbound that will be use to query the network. |
String |
submitSearchLowerBoundValue(Query query)
Construct the string out of the lowerbound that will be use to query the network. |
| Method Detail |
|---|
DataItem createDataItem()
DataItem createDataItem(Object data)
data - the encapsulated data
DataItem createDataItem(GUID guid,
Key key,
Peer host,
Object data)
guid - the guid of the data.key - the key generated of the data.host - the host.data - the encapsulated data.
void handleLocalSearch(Query query,
SearchListener listener)
query - the query.listener - the search listener.String submitSearchLowerBoundValue(Query query)
query - the query being processed.
String submitSearchHigherBoundValue(Query query)
query - the query being processed.
Key generateKey(Object obj)
obj - the source object from which to generate the key
KeyRange generateKeyRange(Object lowerBound,
Object higherBound)
lowerBound - the source object from which to generate the lower keylowerBound - the source object from which to generate the higher key
|
P-Grid v2.0a2 API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||