Package org.jgroups.protocols
Class FRAG3.FragEntry
- java.lang.Object
-
- org.jgroups.protocols.FRAG3.FragEntry
-
- Enclosing class:
- FRAG3
protected 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
buffer
protected java.util.concurrent.locks.Lock
lock
protected Message
msg
protected boolean
needs_deserialization
protected int
num_frags
protected FixedSizeBitSet
received
-
Constructor Summary
Constructors Modifier Constructor Description protected
FragEntry(int num_frags, boolean needs_deserialization)
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
-
needs_deserialization
protected final boolean needs_deserialization
-
-
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() throws java.lang.Exception
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:
java.lang.Exception
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-