Package org.jgroups.stack
Class GossipData
java.lang.Object
org.jgroups.stack.GossipData
- All Implemented Interfaces:
SizeStreamable,Streamable
Encapsulates data sent between GossipRouter and RouterStub (TCPGOSSIP and TUNNEL)
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Address(package private) byte[](package private) String(package private) int(package private) String(package private) int(package private) PhysicalAddress(package private) Address(package private) GossipType -
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()voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
type
GossipType type -
group
String group -
addr
Address addr -
sender
Address sender -
physical_addr
PhysicalAddress physical_addr -
logical_name
String logical_name -
ping_data
-
buffer
byte[] buffer -
offset
int offset -
length
int length
-
-
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
-
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
-