org.jgroups.protocols.tom
Class MessageID

java.lang.Object
  extended by org.jgroups.protocols.tom.MessageID
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<MessageID>, Streamable

public class MessageID
extends java.lang.Object
implements java.io.Externalizable, java.lang.Comparable<MessageID>, java.lang.Cloneable, Streamable

The represents an unique identifier for the messages processed by the Total Order Anycast protocol Note: it is similar to the ViewId (address + counter)

Since:
3.1
Author:
Pedro Ruivo
See Also:
Serialized Form

Constructor Summary
MessageID()
           
MessageID(Address address)
           
MessageID(Address address, long id)
           
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(MessageID other)
           
 MessageID copy()
           
 boolean equals(java.lang.Object other)
           
 Address getAddress()
           
 long getId()
           
 int hashCode()
           
 void readExternal(java.io.ObjectInput objectInput)
           
 void readFrom(java.io.DataInput in)
          Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
 int serializedSize()
           
 void setID(long id)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput objectOutput)
           
 void writeTo(java.io.DataOutput out)
          Write the entire state of the current object (including superclasses) to outstream.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageID

public MessageID()

MessageID

public MessageID(Address address,
                 long id)

MessageID

public MessageID(Address address)
Method Detail

setID

public void setID(long id)

compareTo

public int compareTo(MessageID other)
Specified by:
compareTo in interface java.lang.Comparable<MessageID>

copy

public MessageID copy()

getId

public long getId()

getAddress

public Address getAddress()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

serializedSize

public int serializedSize()

writeTo

public void writeTo(java.io.DataOutput out)
             throws java.lang.Exception
Description copied from interface: Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed

Specified by:
writeTo in interface Streamable
Throws:
java.lang.Exception

readFrom

public void readFrom(java.io.DataInput in)
              throws java.lang.Exception
Description copied from interface: Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed

Specified by:
readFrom in interface Streamable
Throws:
java.lang.Exception

writeExternal

public void writeExternal(java.io.ObjectOutput objectOutput)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput objectInput)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.