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 GossipDataaddPingData(PingData data)AddressgetAddress()byte[]getBuffer()java.lang.StringgetGroup()intgetLength()java.lang.StringgetLogicalName()intgetOffset()PhysicalAddressgetPhysicalAddress()java.util.List<PingData>getPingData()AddressgetSender()GossipTypegetType()voidreadFrom(java.io.DataInput in)Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedvoidreadFrom(java.io.DataInput in, boolean read_type)voidreadFrom(java.io.DataInput in, boolean read_type, boolean read_payload)intserializedSize()Returns the size (in bytes) of the marshalled objectGossipDatasetPingData(java.util.List<PingData> mbrs)GossipDatasetSender(Address s)java.lang.StringtoString()voidwriteTo(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 GossipData setPingData(java.util.List<PingData> mbrs)
-
addPingData
public GossipData addPingData(PingData data)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
serializedSize
public int serializedSize()
Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionDescription copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
readFrom
public void readFrom(java.io.DataInput in, boolean read_type) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
readFrom
public void readFrom(java.io.DataInput in, boolean read_type, boolean read_payload) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-