org.objectweb.dream.protocol.causality
Class MatrixClockUpdateImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.protocol.causality.MatrixClockUpdateImpl
- All Implemented Interfaces:
- AttributeController, BindingController, LifeCycleController, Loggable, MatrixClock, MatrixClockAttributeController
- public class MatrixClockUpdateImpl
- extends AbstractComponent
- implements MatrixClock, MatrixClockAttributeController
Matric clock implementation using
Update
as stamp. More
efficient for large matrix.
Method Summary |
short |
getNumberOfProcess()
Returns the number of process implied in the causality. |
Object |
getStamp(short from,
short to)
Generate a stamp for the specified destination identifier. |
String[] |
listFc()
|
void |
setNumberOfProcess(short numberOfProcess)
Sets the number of process implied in the causality. |
void |
startFc()
|
int |
testRecvMatrix(Object stamp,
short from,
short to)
Test if the received message, the given stamp belong, can be delivered. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatrixClockUpdateImpl
public MatrixClockUpdateImpl()
testRecvMatrix
public int testRecvMatrix(Object stamp,
short from,
short to)
- Description copied from interface:
MatrixClock
- Test if the received message, the given stamp belong, can be delivered. If
the message is ready to be delivered, the method returns
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.
- Specified by:
testRecvMatrix
in interface MatrixClock
- Parameters:
stamp
- a stampfrom
- the identifier of the sender process.to
- the identifier of the local process.
- Returns:
DELIVER
,ALREADY_DELIVERED
, or
WAIT_TO_DELIVER
code.- See Also:
MatrixClock.testRecvMatrix(Object, short, short)
getStamp
public Object getStamp(short from,
short to)
- Description copied from interface:
MatrixClock
- Generate a stamp for the specified destination identifier.
- Specified by:
getStamp
in interface MatrixClock
- Parameters:
from
- the local process identifierto
- the destination process identifier
- Returns:
- a stamp.
- See Also:
MatrixClock.getStamp(short, short)
getNumberOfProcess
public short getNumberOfProcess()
- Description copied from interface:
MatrixClockAttributeController
- Returns the number of process implied in the causality.
- Specified by:
getNumberOfProcess
in interface MatrixClockAttributeController
- Returns:
- the number of process implied in the causality.
- See Also:
MatrixClockAttributeController.getNumberOfProcess()
setNumberOfProcess
public void setNumberOfProcess(short numberOfProcess)
- Description copied from interface:
MatrixClockAttributeController
- Sets the number of process implied in the causality.
- Specified by:
setNumberOfProcess
in interface MatrixClockAttributeController
- Parameters:
numberOfProcess
- the number of process implied in the causality.- See Also:
MatrixClockAttributeController.setNumberOfProcess(short)
listFc
public String[] listFc()
- Specified by:
listFc
in interface BindingController
- See Also:
BindingController.listFc()
startFc
public void startFc()
throws IllegalLifeCycleException
- Specified by:
startFc
in interface LifeCycleController
- Throws:
IllegalLifeCycleException
- See Also:
LifeCycleController.startFc()
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.