|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.p2p.protocol.QEP
public class QEP
Field Summary | |
---|---|
private AutoMedPeer |
_mainPeer
|
private ObjectCache |
_qcache
|
private static QEP |
_qep
|
private java.util.concurrent.ExecutorService |
brokerService
|
Constructor Summary | |
---|---|
private |
QEP(AutoMedPeer mainPeer)
Creates a new instance of QEP |
Method Summary | |
---|---|
private void |
cacheQuery(java.lang.String msgID,
java.lang.String qID)
|
static java.util.Properties |
convertQiToCommProps(java.util.Properties props,
RuntimeParameters params)
Convert selected quality indicator parameters into communication properties |
AbstractMessage |
executeQuery(AbstractMessage request)
Execute query and return result (server-side). |
java.util.Map |
executeQuery(java.lang.String query,
java.lang.String schema,
QueryProcessorConfiguration qpc)
This method should be used as the first invocation by the user application. It is a controller method in that it reads the application parameters to decide a suitable course of action for the query. |
AbstractMessage |
executeQuery(java.lang.String query,
java.lang.String schema,
QueryProcessorConfiguration qpc,
PeerProcessDescription destPeer)
Send a query to the network for execution (client-side). |
static QEP |
getQEPInstance(AutoMedPeer mainPeer)
Return a single QEP instance per JVM |
private boolean |
isInCache(java.lang.String msgID,
java.lang.String qID)
|
private void |
registerPeerHandlers()
Peer: Register message handlers on the peer |
protected AbstractMessage |
sendGroupQuery(AbstractMessage request,
java.lang.String query,
java.lang.String schema,
RuntimeParameters params,
java.util.Collection brokerPeers)
Send a query to a set of peers |
private AbstractMessage |
sendQuery(AbstractMessage request,
java.lang.String query,
java.lang.String schema,
RuntimeParameters params,
PeerProcessDescription destPeer)
Process a query message and forward it on to the next target peer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static QEP _qep
private AutoMedPeer _mainPeer
private java.util.concurrent.ExecutorService brokerService
private ObjectCache _qcache
Constructor Detail |
---|
private QEP(AutoMedPeer mainPeer)
Method Detail |
---|
public static QEP getQEPInstance(AutoMedPeer mainPeer)
protected AbstractMessage sendGroupQuery(AbstractMessage request, java.lang.String query, java.lang.String schema, RuntimeParameters params, java.util.Collection brokerPeers) throws CommunicationException, AutoMedException
queryDesc
- destPeer
-
CommunicationException
AutoMedException
private AbstractMessage sendQuery(AbstractMessage request, java.lang.String query, java.lang.String schema, RuntimeParameters params, PeerProcessDescription destPeer) throws CommunicationException, AutoMedException
request
- query
- schema
- params
- destPeer
-
CommunicationException
AutoMedException
public AbstractMessage executeQuery(java.lang.String query, java.lang.String schema, QueryProcessorConfiguration qpc, PeerProcessDescription destPeer) throws CommunicationException, AutoMedException
qpc
- a QueryProcessorConfiguration
object of the query to be
sentdestPeer
- a PeerProcessDescription
object of the destination peer
to which the query is sent
AbstractMessage
result of query execution
CommunicationException
AutoMedException
public static java.util.Properties convertQiToCommProps(java.util.Properties props, RuntimeParameters params)
public java.util.Map executeQuery(java.lang.String query, java.lang.String schema, QueryProcessorConfiguration qpc) throws CommunicationException, AutoMedException
query
- the use queryschema
- the public schema on which the query is to be evaluatedqpc
- a query processor configuration objecttargetPeers
- a set of peers on which the query will be evaluated
Map
of peer to ASG result
CommunicationException
AutoMedException
public AbstractMessage executeQuery(AbstractMessage request)
request
- AbstractMessage
received from the network
AbstractMessage
the message to send back to clientprivate void cacheQuery(java.lang.String msgID, java.lang.String qID)
private boolean isInCache(java.lang.String msgID, java.lang.String qID)
private void registerPeerHandlers()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |