org.jgroups.protocols.pbcast

Class GMS.GmsHeader

Enclosing Class:
GMS
Implemented Interfaces:
Externalizable, Streamable

public static class GMS.GmsHeader
extends Header
implements Streamable

Field Summary

static byte
CANCEL_MERGE
static byte
INSTALL_MERGE_VIEW
static byte
JOIN_REQ
static byte
JOIN_RSP
static byte
LEAVE_REQ
static byte
LEAVE_RSP
static byte
MERGE_REQ
static byte
MERGE_RSP
static byte
VIEW
static byte
VIEW_ACK

Fields inherited from class org.jgroups.Header

HDR_OVERHEAD

Constructor Summary

GmsHeader()
GmsHeader(byte type)
GmsHeader(byte type, Address mbr)
Used for JOIN_REQ or LEAVE_REQ header
GmsHeader(byte type, View view)
Used for VIEW header
GmsHeader(byte type, JoinRsp join_rsp)
Used for JOIN_RSP header

Method Summary

Address
getMemeber()
byte
getType()
void
readExternal(ObjectInput in)
void
readFrom(DataInputStream in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
long
size()
String
toString()
static String
type2String(int type)
void
writeExternal(ObjectOutput out)
void
writeTo(DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream.

Methods inherited from class org.jgroups.Header

size, toString

Field Details

CANCEL_MERGE

public static final byte CANCEL_MERGE
Field Value:
9

INSTALL_MERGE_VIEW

public static final byte INSTALL_MERGE_VIEW
Field Value:
8

JOIN_REQ

public static final byte JOIN_REQ
Field Value:
1

JOIN_RSP

public static final byte JOIN_RSP
Field Value:
2

LEAVE_REQ

public static final byte LEAVE_REQ
Field Value:
3

LEAVE_RSP

public static final byte LEAVE_RSP
Field Value:
4

MERGE_REQ

public static final byte MERGE_REQ
Field Value:
6

MERGE_RSP

public static final byte MERGE_RSP
Field Value:
7

VIEW

public static final byte VIEW
Field Value:
5

VIEW_ACK

public static final byte VIEW_ACK
Field Value:
10

Constructor Details

GmsHeader

public GmsHeader()

GmsHeader

public GmsHeader(byte type)

GmsHeader

public GmsHeader(byte type,
                 Address mbr)
Used for JOIN_REQ or LEAVE_REQ header

GmsHeader

public GmsHeader(byte type,
                 View view)
Used for VIEW header

GmsHeader

public GmsHeader(byte type,
                 JoinRsp join_rsp)
Used for JOIN_RSP header

Method Details

getMemeber

public Address getMemeber()

getType

public byte getType()

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

readFrom

public void readFrom(DataInputStream in)
            throws IOException,
                   IllegalAccessException,
                   InstantiationException
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

size

public long size()
Overrides:
size in interface Header

toString

public String toString()
Overrides:
toString in interface Header

type2String

public static String type2String(int type)

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException

writeTo

public void writeTo(DataOutputStream out)
            throws IOException
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

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.