P-Grid v2.0a2 API Specification

p2p.storage
Interface Query


public interface Query

Defines the operations that queries support. A query includes a query string pair and a type of relevant items. It is used to specify a search request for the storage layer. A simple query, where we are looking for a precise data item, is considered as a special kind of range query where both bounds are equals.

Version:
1.0.0
Author:
@author Roman Schmidt

Method Summary
 GUID getGUID()
          Get the query's guid.
 String getHigherBound()
          Get the higher query string that defines the query, e.g. a keyword such as 'Madonna' or a semantic query such as '<predicate>Actor</predicate><object>Madonna</object>'.
 KeyRange getKeyRange()
          Get the key of the query used to route it to the responsible peer.
 String getLowerBound()
          Get the lower bound of the range query string that defines the query, e.g. a keyword such as 'Madonna' or a semantic query such as '<predicate>Actor</predicate><object>Madonna</object>'.
 int getStatus()
          Get the query's status code, as defined by the storage layer.
 Type getType()
          Get the type of items the query considers, e.g. text/file, etc.
 

Method Detail

getGUID

GUID getGUID()
Get the query's guid. Used to identify the query across the network.

Returns:
the global unique identifier

getKeyRange

KeyRange getKeyRange()
Get the key of the query used to route it to the responsible peer.

Returns:
the query's key.

getStatus

int getStatus()
Get the query's status code, as defined by the storage layer.

Returns:
the status code

getType

Type getType()
Get the type of items the query considers, e.g. text/file, etc.

Returns:
the query's target type

getLowerBound

String getLowerBound()
Get the lower bound of the range query string that defines the query, e.g. a keyword such as 'Madonna' or a semantic query such as '<predicate>Actor</predicate><object>Madonna</object>'.

Returns:
the query string

getHigherBound

String getHigherBound()
Get the higher query string that defines the query, e.g. a keyword such as 'Madonna' or a semantic query such as '<predicate>Actor</predicate><object>Madonna</object>'.

Returns:
the query string

P-Grid v2.0a2 API Specification

This is open source software distributed under the terms of the GNU General Public License, a copy of which is included in the file LICENSE. If not you can find the GPL at http://www.gnu.org/copyleft/gpl.txt