org.objectweb.dream.protocol.bus.logicalClock
Class FIFOClock
java.lang.Object
org.objectweb.dream.protocol.bus.logicalClock.FIFOClock
- All Implemented Interfaces:
- LogicalClock
public class FIFOClock
- extends Object
- implements LogicalClock
TODO Add class comment
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stamp
protected int[] stamp
lastDelivered
protected int[] lastDelivered
myAddress
protected int myAddress
size
protected int size
logicalClockChunkName
protected String logicalClockChunkName
messageManager
protected MessageManager messageManager
logicalClockChunkFactory
protected ChunkFactoryReference<LogicalClockChunk> logicalClockChunkFactory
FIFOClock
public FIFOClock(int size,
int myAddress,
String logicalClockChunkName,
MessageManager messageManager)
- Parameters:
size
- the bus size;myAddress
- the local address in the bus.logicalClockChunkName
- the name of the chunk to add in the message.messageManager
- the message manager.
testRecvMessage
public int testRecvMessage(Message message)
- Description copied from interface:
LogicalClock
- Test if the given message can be delivered. If the message is ready to be
delivered, the method returns
DELIVER
. 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
.
- Specified by:
testRecvMessage
in interface LogicalClock
- Parameters:
message
- the message to test.
- Returns:
DELIVER
,ALREADY_DELIVERED
, or
WAIT_TO_DELIVER
code.- See Also:
LogicalClock.testRecvMessage(Message)
stamp
public void stamp(Message message,
int to)
- Description copied from interface:
LogicalClock
- Stamps the given message.
- Specified by:
stamp
in interface LogicalClock
- Parameters:
message
- a message to stampto
- the address of the destination process.- See Also:
LogicalClock.stamp(Message, int)
Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.