Package org.jgroups.protocols
Class FRAG3.FragEntry
java.lang.Object
org.jgroups.protocols.FRAG3.FragEntry
- Enclosing class:
FRAG3
Entry for a full message, received fragments are copied into buffer and set in the bitset of expected frags.
When complete, the buffer is set in the resulting message and the message returned.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected final Lockprotected Messageprotected final booleanprotected final intprotected final FixedSizeBitSet -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFragEntry(int num_frags, boolean needs_deserialization) Creates a new entry -
Method Summary
Modifier and TypeMethodDescriptionprotected MessageAssembles all the fragments into one buffer.protected booleanReturns true if this fragmentation is complete, ie all fragments have been received for this bufferset(Message frag_msg, Frag3Header hdr) Adds a fragment to the full messagetoString()
-
Field Details
-
lock
-
msg
-
buffer
protected byte[] buffer -
num_frags
protected final int num_frags -
received
-
needs_deserialization
protected final boolean needs_deserialization
-
-
Constructor Details
-
FragEntry
protected FragEntry(int num_frags, boolean needs_deserialization) Creates a new entry- Parameters:
num_frags- the number of fragments expected for this message
-
-
Method Details
-
set
Adds a fragment to the full message -
isComplete
protected boolean isComplete()Returns true if this fragmentation is complete, ie all fragments have been received for this buffer -
assembleMessage
Assembles all the fragments into one buffer. Takes all Messages, and combines their buffers into one buffer.- Returns:
- the complete message in one buffer
- Throws:
Exception
-
toString
-