public static class TOTAL.Header extends Header implements Streamable
Modifier and Type | Field and Description |
---|---|
static int |
BCAST
Broadcast Message
|
long |
localSequenceID
The ID used by the message source to match replies from the
sequencer
|
static int |
NULL_TYPE
Null value for the tag
|
static int |
REP
Reply to broadcast request.
|
static int |
REQ
Request to broadcast by the source
|
long |
sequenceID
The ID imposing the total order of messages
|
int |
type
The header's type tag
|
static int |
UCAST
Unicast message
|
HDR_OVERHEAD
Constructor and Description |
---|
TOTAL.Header()
used for externalization
|
TOTAL.Header(int type,
long localSeqID,
long seqID)
Create a header for the TOTAL layer
|
Modifier and Type | Method and Description |
---|---|
void |
readExternal(java.io.ObjectInput in)
Manual deserialization
|
void |
readFrom(java.io.DataInputStream in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
long |
size()
To be implemented by subclasses.
|
java.lang.String |
toString()
For debugging purposes
|
void |
writeExternal(java.io.ObjectOutput out)
Manual serialization
|
void |
writeTo(java.io.DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream.
|
public static final int NULL_TYPE
public static final int REQ
public static final int REP
public static final int UCAST
public static final int BCAST
public int type
public long localSequenceID
public long sequenceID
public TOTAL.Header()
public TOTAL.Header(int type, long localSeqID, long seqID)
type
- the header's typelocalSeqID
- the ID used by the sender of broadcasts to match
requests with replies from the sequencerseqID
- the ID imposing the total order of messagesjava.lang.IllegalArgumentException
- if the provided header type is
unknownpublic java.lang.String toString()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeTo(java.io.DataOutputStream out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException
public void readFrom(java.io.DataInputStream in) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException
Streamable
readFrom
in interface Streamable
java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
public long size()
Header
Copyright ? 1998-2006 Bela Ban. All Rights Reserved.