universal
Class AmAliveMessage

java.lang.Object
  |
  +--universal.Message
        |
        +--universal.AmAliveMessage
All Implemented Interfaces:
java.io.Serializable

public class AmAliveMessage
extends Message

Used in leader election. Heartbeat message send periodically to inform the others replicas and the client that the sender is still alive

See Also:
Serialized Form

Field Summary
 int[] epochArray
          the variable epochArray is not useful in the crashStop model but could be in the crash recovery model
 
Fields inherited from class universal.Message
ACK_READ_MSG, ACK_WRITE_MSG, AM_ALIVE_MSG, mid, msgType, NACK_READ_MSG, NACK_WRITE_MSG, READ_MSG, senderid, WRITE_MSG
 
Constructor Summary
AmAliveMessage(int[] epochArray)
           
 
Method Summary
static universal.AmAliveMessage decode(java.io.DataInputStream dis)
          If you want to decode an AmAliveMessage, you should call the method Decode of the superclass Message, not this one.
 byte[] encode()
          If you want to encode an AmAliveMessage, you should call this method not the one from the superclass.
 java.lang.String toString()
           
 
Methods inherited from class universal.Message
decode, msgId, msgType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

epochArray

public int[] epochArray
the variable epochArray is not useful in the crashStop model but could be in the crash recovery model

Constructor Detail

AmAliveMessage

public AmAliveMessage(int[] epochArray)
Method Detail

decode

public static universal.AmAliveMessage decode(java.io.DataInputStream dis)
If you want to decode an AmAliveMessage, you should call the method Decode of the superclass Message, not this one.

Returns:
an AmAliveMessage

encode

public byte[] encode()
If you want to encode an AmAliveMessage, you should call this method not the one from the superclass.

Overrides:
encode in class Message
Returns:
an array of byte which contains all the information of this AmAliveMessage.

toString

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