Package org.jgroups.protocols
Class FRAG3.FragEntry
- java.lang.Object
-
- org.jgroups.protocols.FRAG3.FragEntry
-
- Enclosing class:
- FRAG3
protected static class FRAG3.FragEntry extends java.lang.Object
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.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FragEntry(int num_frags)
Creates a new entry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Message
assembleMessage()
Assembles all the fragments into one buffer.protected boolean
isComplete()
Returns true if this fragmentation is complete, ie all fragments have been received for this bufferMessage
set(Message frag_msg, Frag3Header hdr)
Adds a fragment to the full messagejava.lang.String
toString()
-
-
-
Field Detail
-
lock
protected final java.util.concurrent.locks.Lock lock
-
msg
protected Message msg
-
buffer
protected byte[] buffer
-
num_frags
protected final int num_frags
-
received
protected final FixedSizeBitSet received
-
-
Method Detail
-
set
public Message set(Message frag_msg, Frag3Header hdr)
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
protected Message 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-