org.jgroups.protocols.pbcast

Class PbcastHeader

Implemented Interfaces:
Externalizable

public class PbcastHeader
extends Header

Field Summary

static int
GOSSIP
static int
MCAST_MSG
static int
NOT_MEMBER
static int
XMIT_REQ
static int
XMIT_RSP

Fields inherited from class org.jgroups.Header

HDR_OVERHEAD

Constructor Summary

PbcastHeader()
PbcastHeader(int type)
PbcastHeader(int type, long seqno)
PbcastHeader(Gossip g, int type)
PbcastHeader(Gossip g, int type, long seqno)

Method Summary

long
getSeqno()
void
readExternal(ObjectInput in)
long
size()
To be implemented by subclasses.
String
toString()
static String
type2String(int t)
void
writeExternal(ObjectOutput out)

Methods inherited from class org.jgroups.Header

size, toString

Field Details

GOSSIP

public static final int GOSSIP
Field Value:
1

MCAST_MSG

public static final int MCAST_MSG
Field Value:
0

NOT_MEMBER

public static final int NOT_MEMBER
Field Value:
4

XMIT_REQ

public static final int XMIT_REQ
Field Value:
2

XMIT_RSP

public static final int XMIT_RSP
Field Value:
3

Constructor Details

PbcastHeader

public PbcastHeader()

PbcastHeader

public PbcastHeader(int type)

PbcastHeader

public PbcastHeader(int type,
                    long seqno)

PbcastHeader

public PbcastHeader(Gossip g,
                    int type)

PbcastHeader

public PbcastHeader(Gossip g,
                    int type,
                    long seqno)

Method Details

getSeqno

public long getSeqno()

readExternal

public void readExternal(ObjectInput in)
            throws IOException,
                   ClassNotFoundException

size

public long size()
To be implemented by subclasses. Return the size of this object for the serialized version of it. I.e. how many bytes this object takes when flattened into a buffer. This may be different for each instance, or can be the same. This may also just be an estimation. E.g. FRAG uses it on Message to determine whether or not to fragment the message. Fragmentation itself will be accurate, because the entire message will actually be serialized into a byte buffer, so we can determine the exact size.
Overrides:
size in interface Header

toString

public String toString()
Overrides:
toString in interface Header

type2String

public static String type2String(int t)

writeExternal

public void writeExternal(ObjectOutput out)
            throws IOException

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