|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object grinda.impl.brokers.MasterSlaveTupleBroker
public class MasterSlaveTupleBroker
An implementation of a broker that considers peers being master or slaves.
This broker is useful for cluster with a master and some slaves.
The property named master.host
contains the master's url.
Constructor Summary | |
---|---|
MasterSlaveTupleBroker()
|
Method Summary | |
---|---|
TupleSpaceResult |
clientRequest(TupleSpaceOperation op,
java.lang.String client)
Called when the client performs an |
java.lang.Object |
clone()
|
protected TupleSpaceResult |
executeOnLocalSpaces(TupleSpaceOperation op,
java.lang.String client)
|
java.lang.Object |
getID()
|
void |
initialize(java.lang.String id,
TupleSpaceConfigurationParameter[] c)
initialize |
GrindaResponse |
peerRequest(GrindaRequest m)
Called when a result arrives |
void |
peerResult(GrindaResponse m)
Called when a result arrives |
void |
subscribe(TupleSpaceOperation op,
java.lang.String h)
subscribe |
void |
unsubscribe(TupleSpaceOperation op,
java.lang.String h)
unsubscribe |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MasterSlaveTupleBroker()
Method Detail |
---|
public java.lang.Object clone()
clone
in interface TupleBroker
clone
in class java.lang.Object
public java.lang.Object getID()
public TupleSpaceResult clientRequest(TupleSpaceOperation op, java.lang.String client) throws java.rmi.RemoteException
ClientListener
clientRequest
in interface ClientListener
op
- TupleSpaceOperationclient
- EndpointReferenceType
java.rmi.RemoteException
public void initialize(java.lang.String id, TupleSpaceConfigurationParameter[] c)
initialize
in interface TupleBroker
c
- initial configurationpublic GrindaResponse peerRequest(GrindaRequest m)
RequestListener
peerRequest
in interface RequestListener
m
- the message representing the result
public void peerResult(GrindaResponse m)
ResultListener
peerResult
in interface ResultListener
m
- the message representing the resultpublic void subscribe(TupleSpaceOperation op, java.lang.String h)
subscribe
in interface SubscriptionListener
op
- TupleSpaceOperationh
- EndpointReferenceTypepublic void unsubscribe(TupleSpaceOperation op, java.lang.String h)
unsubscribe
in interface SubscriptionListener
op
- TupleSpaceOperationh
- Stringprotected TupleSpaceResult executeOnLocalSpaces(TupleSpaceOperation op, java.lang.String client)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |