Class GossipData
java.lang.Object
org.jgroups.stack.GossipData
- All Implemented Interfaces:
SizeStreamable, Streamable
Encapsulates data sent between GossipRouter and RouterStub (TCPGOSSIP and TUNNEL)
- Author:
- Bela Ban Oct 4 2001
-
Constructor Summary
ConstructorsConstructorDescriptionGossipData(GossipType type) GossipData(GossipType type, String group, Address addr) GossipData(GossipType type, String group, Address addr, byte[] buffer) GossipData(GossipType type, String group, Address addr, byte[] buffer, int offset, int length) GossipData(GossipType type, String group, Address addr, String logical_name, PhysicalAddress physical_addr) GossipData(GossipType type, String group, Address addr, List<PingData> ping_data) GossipData(GossipType type, String group, Address addr, List<PingData> ping_data, PhysicalAddress physical_addr) -
Method Summary
Modifier and TypeMethodDescriptionaddPingData(PingData data) byte[]getGroup()intintgetType()voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedvoidvoidintReturns the size (in bytes) of the marshalled objectsetPingData(List<PingData> mbrs) toString()static voidwriteMetadata(DataOutput out, String group, Address addr, Address sender, int len) voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Constructor Details
-
GossipData
public GossipData() -
GossipData
-
GossipData
-
GossipData
-
GossipData
public GossipData(GossipType type, String group, Address addr, List<PingData> ping_data, PhysicalAddress physical_addr) -
GossipData
public GossipData(GossipType type, String group, Address addr, String logical_name, PhysicalAddress physical_addr) -
GossipData
-
GossipData
public GossipData(GossipType type, String group, Address addr, byte[] buffer, int offset, int length)
-
-
Method Details
-
getType
-
getGroup
-
getAddress
-
getSender
-
setSender
-
getLogicalName
-
getPingData
-
getBuffer
public byte[] getBuffer() -
getOffset
public int getOffset() -
getLength
public int getLength() -
getPhysicalAddress
-
setPingData
-
addPingData
-
toString
-
serializedSize
public int serializedSize()Description copied from interface:SizeStreamableReturns the size (in bytes) of the marshalled object- Specified by:
serializedSizein interfaceSizeStreamable
-
writeTo
Description 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:
IOException
-
writeMetadata
public static void writeMetadata(DataOutput out, String group, Address addr, Address sender, int len) throws IOException - Throws:
IOException
-
readFrom
Description 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:
IOExceptionClassNotFoundException
-
readFrom
- Throws:
IOExceptionClassNotFoundException
-
readFrom
public void readFrom(DataInput in, boolean read_type, boolean read_payload) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-