Package org.jgroups.stack
Class GossipData
- java.lang.Object
-
- org.jgroups.stack.GossipData
-
- All Implemented Interfaces:
SizeStreamable
,Streamable
public class GossipData extends java.lang.Object implements SizeStreamable
Encapsulates data sent between GossipRouter and RouterStub (TCPGOSSIP and TUNNEL)- Author:
- Bela Ban Oct 4 2001
-
-
Constructor Summary
Constructors Constructor Description GossipData()
GossipData(GossipType type)
GossipData(GossipType type, java.lang.String group, Address addr)
GossipData(GossipType type, java.lang.String group, Address addr, byte[] buffer)
GossipData(GossipType type, java.lang.String group, Address addr, byte[] buffer, int offset, int length)
GossipData(GossipType type, java.lang.String group, Address addr, java.lang.String logical_name, PhysicalAddress physical_addr)
GossipData(GossipType type, java.lang.String group, Address addr, java.util.List<PingData> ping_data)
GossipData(GossipType type, java.lang.String group, Address addr, java.util.List<PingData> ping_data, PhysicalAddress physical_addr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPingData(PingData data)
Address
getAddress()
byte[]
getBuffer()
java.lang.String
getGroup()
int
getLength()
java.lang.String
getLogicalName()
int
getOffset()
PhysicalAddress
getPhysicalAddress()
java.util.List<PingData>
getPingData()
Address
getSender()
GossipType
getType()
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 closedprotected void
readFrom(java.io.DataInput in, boolean read_type)
int
serializedSize()
Returns the size (in bytes) of the marshalled objectvoid
setPingData(java.util.List<PingData> mbrs)
GossipData
setSender(Address s)
java.lang.String
toString()
void
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
-
-
-
Constructor Detail
-
GossipData
public GossipData()
-
GossipData
public GossipData(GossipType type)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr, java.util.List<PingData> ping_data)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr, java.util.List<PingData> ping_data, PhysicalAddress physical_addr)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr, java.lang.String logical_name, PhysicalAddress physical_addr)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr, byte[] buffer)
-
GossipData
public GossipData(GossipType type, java.lang.String group, Address addr, byte[] buffer, int offset, int length)
-
-
Method Detail
-
getType
public GossipType getType()
-
getGroup
public java.lang.String getGroup()
-
getAddress
public Address getAddress()
-
getSender
public Address getSender()
-
setSender
public GossipData setSender(Address s)
-
getLogicalName
public java.lang.String getLogicalName()
-
getPingData
public java.util.List<PingData> getPingData()
-
getBuffer
public byte[] getBuffer()
-
getOffset
public int getOffset()
-
getLength
public int getLength()
-
getPhysicalAddress
public PhysicalAddress getPhysicalAddress()
-
setPingData
public void setPingData(java.util.List<PingData> mbrs)
-
addPingData
public void addPingData(PingData data)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamable
Returns the size (in bytes) of the marshalled object- Specified by:
serializedSize
in interfaceSizeStreamable
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
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 interfaceStreamable
- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
readFrom
protected void readFrom(java.io.DataInput in, boolean read_type) throws java.io.IOException, java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
-