Package org.jgroups.protocols
Class FRAG2.FragEntry
- java.lang.Object
-
- org.jgroups.protocols.FRAG2.FragEntry
-
- Enclosing class:
- FRAG2
protected static class FRAG2.FragEntry extends java.lang.Object
Class represents an entry for a message. Each entry holds an array of byte arrays sorted once all the byte buffer entries have been filled the fragmentation is considered complete.
All methods are unsynchronized, use getLock() to obtain a lock for concurrent access.
-
-
Field Summary
Fields Modifier and Type Field Description protected Message[]
fragments
protected java.util.concurrent.locks.Lock
lock
protected boolean
needs_deserialization
protected int
number_of_frags_recvd
-
Constructor Summary
Constructors Modifier Constructor Description protected
FragEntry(int tot_frags, boolean needs_deserialization)
Creates a new entry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isComplete()
returns true if this fragmentation is complete ie, all fragmentations have been received for this buffervoid
set(int frag_id, Message frag)
adds on fragmentation buffer to the messagejava.lang.String
toString()
-
-
-
Field Detail
-
fragments
protected final Message[] fragments
-
number_of_frags_recvd
protected int number_of_frags_recvd
-
needs_deserialization
protected final boolean needs_deserialization
-
lock
protected final java.util.concurrent.locks.Lock lock
-
-
Method Detail
-
set
public void set(int frag_id, Message frag)
adds on fragmentation buffer to the message- Parameters:
frag_id
- the number of the fragment being added 0..(tot_num_of_frags - 1)frag
- the byte buffer containing the data for this fragmentation, should not be null
-
isComplete
public boolean isComplete()
returns true if this fragmentation is complete ie, all fragmentations have been received for this buffer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-