|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Component interfae to manipulate causal matrix clock. The causality protocol composite allows n processes to exchange causaly ordered messages. Each process has a identifier form 0 to n-1 . When a process send a message to an other, this message is stamped by the causality protocol. Before to be delivered to the destination process, the stamp of a given message is analysed to know if other messages should be delivered before this one.
Field Summary | |
static int |
ALREADY_DELIVERED
the value returned by testRecvMatrix(Object, short, short) if the message
has already been delivred. |
static int |
DELIVER
the value returned by testRecvMatrix(Object, short, short) if the message
can be delivred |
static String |
MATRIX_CLOCK_ITF_NAME
The default name of MatrixClock interfaces |
static int |
WAIT_TO_DELIVER
the value returned by testRecvMatrix(Object, short, short) if there is other
message in the causal ordering before this. |
Method Summary | |
Object |
getStamp(short from,
short to)
Generate a stamp for the specified destination identifier. |
int |
testRecvMatrix(Object stamp,
short from,
short to)
Test if the received message, the given stamp belong, can be delivered. |
Field Detail |
public static final String MATRIX_CLOCK_ITF_NAME
MatrixClock
interfaces
public static final int DELIVER
testRecvMatrix(Object, short, short)
if the message
can be delivred
public static final int WAIT_TO_DELIVER
testRecvMatrix(Object, short, short)
if there is other
message in the causal ordering before this.
public static final int ALREADY_DELIVERED
testRecvMatrix(Object, short, short)
if the message
has already been delivred.
Method Detail |
public int testRecvMatrix(Object stamp, short from, short to)
DELIVER
and the matrix clock is updated. If the message has
already been delivered, the method returns ALREADY_DELIVERED
,
and if other messages are waited before this message the method returns
WAIT_TO_DELIVER
. In the last two case the matrix clock
remains unchanged.
stamp
- a stampfrom
- the identifier of the sender process.to
- the identifier of the local process.
DELIVER
,ALREADY_DELIVERED
, or
WAIT_TO_DELIVER
code.public Object getStamp(short from, short to)
from
- the local process identifierto
- the destination process identifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |