public class ToaHeader extends Header
限定符和类型 | 字段和说明 |
---|---|
static byte |
DATA_MESSAGE |
static byte |
FINAL_MESSAGE |
static byte |
PROPOSE_MESSAGE |
static byte |
SINGLE_DESTINATION_MESSAGE |
构造器和说明 |
---|
ToaHeader() |
限定符和类型 | 方法和说明 |
---|---|
static ToaHeader |
createSingleDestinationHeader(MessageID messageID) |
java.util.Collection<Address> |
getDestinations() |
MessageID |
getMessageID() |
long |
getSequencerNumber() |
byte |
getType() |
static ToaHeader |
newDataMessageHeader(MessageID messageID,
java.util.Collection<Address> destinations) |
static ToaHeader |
newFinalMessageHeader(MessageID messageID,
long sequenceNumber) |
static ToaHeader |
newProposeMessageHeader(MessageID messageID,
long sequencerNumber) |
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
|
ToaHeader |
setSequencerNumber(long sequencerNumber) |
int |
size()
To be implemented by subclasses.
|
java.lang.String |
toString() |
static java.lang.String |
type2String(byte type) |
void |
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
public static final byte DATA_MESSAGE
public static final byte PROPOSE_MESSAGE
public static final byte FINAL_MESSAGE
public static final byte SINGLE_DESTINATION_MESSAGE
public MessageID getMessageID()
public java.util.Collection<Address> getDestinations()
public long getSequencerNumber()
public ToaHeader setSequencerNumber(long sequencerNumber)
public byte getType()
public int size()
Header
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
Streamable
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
Streamable
java.lang.Exception
public static java.lang.String type2String(byte type)
public static ToaHeader newDataMessageHeader(MessageID messageID, java.util.Collection<Address> destinations)
public static ToaHeader newProposeMessageHeader(MessageID messageID, long sequencerNumber)
public static ToaHeader newFinalMessageHeader(MessageID messageID, long sequenceNumber)