uk.ac.ic.doc.automed.p2p
Class QueryGetter
java.lang.Object
uk.ac.ic.doc.automed.p2p.QueryGetter
- All Implemented Interfaces:
- IQueryAggregator
- Direct Known Subclasses:
- AdvancedQueryGetter
public class QueryGetter
- extends java.lang.Object
- implements IQueryAggregator
- Author:
- Charis
TODO To change the template for this generated type comment go to
Window - Preferences - Java - Code Style - Code Templates
Method Summary |
java.util.Map |
getQueryResults(java.lang.String query,
java.lang.String schema,
PeerDescription[] peerDescs,
QueryProcessorConfiguration qpc)
A more general method for concurrently executing a query over a group of
remote peers
|
ASG |
getQueryResults(java.lang.String peerName,
java.lang.String address,
java.lang.String schema,
java.lang.String query)
Use QEP to send query request for execution |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
peer
protected AutoMedPeer peer
QueryGetter
public QueryGetter(AutoMedPeer peer)
getQueryResults
public ASG getQueryResults(java.lang.String peerName,
java.lang.String address,
java.lang.String schema,
java.lang.String query)
throws UnsuccessfulReplyException,
CommunicationException
- Use
QEP
to send query request for execution
- Specified by:
getQueryResults
in interface IQueryAggregator
- Parameters:
peerName
- the logical name of the peeraddress
- a url that resolves to an IP addres, or an IP address,
of the host where the peer is currently located.schema
- the name of the public schema on the peer to queryquery
- the query to pose on that public schema
- Throws:
UnsuccessfulReplyException
CommunicationException
getQueryResults
public java.util.Map getQueryResults(java.lang.String query,
java.lang.String schema,
PeerDescription[] peerDescs,
QueryProcessorConfiguration qpc)
throws UnsuccessfulReplyException,
CommunicationException,
QueryResultException
- A more general method for concurrently executing a query over a group of
remote peers
- Specified by:
getQueryResults
in interface IQueryAggregator
- Parameters:
peerDescs
- an array of PeerDescription
objectsqueryDesc
- a QueryProcessorConfiguration
object
- Returns:
- Map a hashed map of [peerDesc -->
ASG
query]
- Throws:
UnsuccessfulReplyException
CommunicationException
QueryResultException