Package org.jgroups.protocols
Class FRAG2.FragEntry
java.lang.Object
org.jgroups.protocols.FRAG2.FragEntry
- Enclosing class:
FRAG2
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
FieldsModifier and TypeFieldDescriptionprotected final Message[]protected final Lockprotected final MessageFactoryprotected final booleanprotected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFragEntry(int tot_frags, boolean needs_deserialization, MessageFactory mf) Creates a new entry -
Method Summary
Modifier and TypeMethodDescriptionbooleanreturns true if this fragmentation is complete ie, all fragmentations have been received for this buffervoidadds on fragmentation buffer to the messagetoString()
-
Field Details
-
fragments
-
number_of_frags_recvd
protected int number_of_frags_recvd -
needs_deserialization
protected final boolean needs_deserialization -
msg_factory
-
lock
-
-
Constructor Details
-
FragEntry
Creates a new entry- Parameters:
tot_frags- the number of fragments to expect for this message
-
-
Method Details
-
set
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
-