|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjgroup.relacs.gmi.protocols.BasicDispatcher
jgroup.relacs.gmi.protocols.Atomic
public class Atomic
Atomic represents a protocol that dispatch method invocations received through the local endpoint to all the other methods of the group, including the local server. Each message received is ordered according to a total order among all members of the group. The result from all members is returned to the local endpoint whom first received the method invocation request from some client, and one of results are selected and passed back to the client. Total ordering is accomplished using distributed agreement protocol similar to that of [Birman and Joseph 1987].
Constructor Summary | |
---|---|
Atomic(GroupInvocationDispatcher dispatcher,
MulticastService mcast,
MembershipService pgms)
|
Method Summary | |
---|---|
java.lang.Object |
deliverObject(java.lang.Object msg,
MemberId sender,
int seqNo)
Upcall that is invoked by Jgroup to deliver a message msg ,
corresponding to a single serialized object. |
java.lang.Object |
deliverStream(java.io.InputStream msg,
MemberId sender,
int seqNo)
Received a multicast message from a mediating endpoint for invocation dispatching at the local server. |
InvocationResult |
dispatch(java.io.InputStream in)
Handle inbound request to the local endpoint with atomic invocation semantics. |
java.lang.String |
getProtocolName()
Returns a string naming the protocol implemented by this multicast listener. |
Methods inherited from class jgroup.relacs.gmi.protocols.BasicDispatcher |
---|
getIdentifier, setServer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Atomic(GroupInvocationDispatcher dispatcher, MulticastService mcast, MembershipService pgms)
Method Detail |
---|
public InvocationResult dispatch(java.io.InputStream in) throws java.io.IOException
dispatch
in interface ProtocolDispatcher
dispatch
in class BasicDispatcher
in
- the method to invoke, encoded in the provided InputStream
.
java.io.IOException
- Raised if the method invocation read from the
InputStream
could not be executed for some reason.ProtocolDispatcher.dispatch(java.io.InputStream)
public java.lang.String getProtocolName()
MulticastListener
getProtocolName
in interface MulticastListener
public java.lang.Object deliverStream(java.io.InputStream msg, MemberId sender, int seqNo)
deliverStream
in interface MulticastListener
msg
- Atomic multicast message receivedsender
- the sender of the multicast messageseqNo
- the sequence number of this multicast message
null
if the invocation failed.MulticastListener.deliverStream(java.io.InputStream, jgroup.core.MemberId, int)
public java.lang.Object deliverObject(java.lang.Object msg, MemberId sender, int seqNo)
MulticastListener
msg
,
corresponding to a single serialized object.
deliverObject
in interface MulticastListener
msg
- the object that was multicasted.sender
- the sender of the multicast messageseqNo
- the sequence number of this multicast message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |