org.objectweb.dream.protocol.bus.logicalClock
Class LogicalClockChunk

java.lang.Object
  extended by org.objectweb.dream.message.AbstractChunk<LogicalClockChunk>
      extended by org.objectweb.dream.protocol.bus.logicalClock.LogicalClockChunk
All Implemented Interfaces:
Externalizable, Serializable, Recyclable

public final class LogicalClockChunk
extends AbstractChunk<LogicalClockChunk>

Chunk added by used by Logical clock protocol.

See Also:
Serialized Form

Field Summary
static String DEFAULT_NAME
          The default name for chunks of this type
 
Constructor Summary
LogicalClockChunk()
           
 
Method Summary
static String filterChunkName(String chunkName)
          If the given chunkName is equals to the default name returns DEFAULT_NAME, returns the given string otherwise.
 int getFrom()
          Returns the address of the process that emit this chunk.
 Object getLogicalClock()
          Returns the logical clock of this chunk
 LogicalClockChunk newChunk()
           
 void readExternal(ObjectInput in)
           
 void recycle()
           
 void setFrom(int from)
          Sets the address of the process that emit this chunk.
 void setLogicalClock(Object stamp)
          Sets the logical clock of this chunk
 void transfertStateTo(LogicalClockChunk newInstance)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.objectweb.dream.message.AbstractChunk
getReference, setReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NAME

public static final String DEFAULT_NAME
The default name for chunks of this type

See Also:
Constant Field Values
Constructor Detail

LogicalClockChunk

public LogicalClockChunk()
Method Detail

filterChunkName

public static String filterChunkName(String chunkName)
If the given chunkName is equals to the default name returns DEFAULT_NAME, returns the given string otherwise.

Parameters:
chunkName - the chunk name to filter.
Returns:
DEFAULT_NAME or the given chunkName.

getLogicalClock

public Object getLogicalClock()
Returns the logical clock of this chunk

Returns:
the logical clock of this chunk

setLogicalClock

public void setLogicalClock(Object stamp)
Sets the logical clock of this chunk

Parameters:
stamp - the stamp

getFrom

public int getFrom()
Returns the address of the process that emit this chunk.

Returns:
the address of the process that emit this chunk.

setFrom

public void setFrom(int from)
Sets the address of the process that emit this chunk.

Parameters:
from - the address of the process that emit this chunk.

transfertStateTo

public void transfertStateTo(LogicalClockChunk newInstance)
Specified by:
transfertStateTo in class AbstractChunk<LogicalClockChunk>
See Also:
AbstractChunk.transfertStateTo(AbstractChunk)

newChunk

public LogicalClockChunk newChunk()
Specified by:
newChunk in class AbstractChunk<LogicalClockChunk>
See Also:
AbstractChunk.newChunk()

recycle

public void recycle()
See Also:
Recyclable.recycle()

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Throws:
IOException
ClassNotFoundException
See Also:
Externalizable.readExternal(ObjectInput)

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Throws:
IOException
See Also:
Externalizable.writeExternal(ObjectOutput)


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.