Package org.jgroups.protocols
Class FRAG.FragmentationTable.FragEntry
- java.lang.Object
-
- org.jgroups.protocols.FRAG.FragmentationTable.FragEntry
-
- Enclosing class:
- FRAG.FragmentationTable
static class FRAG.FragmentationTable.FragEntry extends java.lang.Objectinner 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.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[][]fragments(package private) longmsg_id(package private) intnumber_of_frags_recvd(package private) inttot_frags
-
Constructor Summary
Constructors Constructor Description FragEntry(long msg_id, int tot_frags)Creates a new entry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]assembleBuffer()Assembles all the fragmentations into one buffer this method does not check if the fragmentation is completeinthashCode()booleanisComplete()returns true if this fragmentation is complete ie, all fragmentations have been received for this buffervoidset(int frag_id, byte[] frag)adds on fragmentation buffer to the messagejava.lang.StringtoString()debug only
-
-
-
Method Detail
-
set
public void set(int frag_id, byte[] 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
-
assembleBuffer
public byte[] assembleBuffer()
Assembles all the fragmentations into one buffer this method does not check if the fragmentation is complete- Returns:
- the complete message in one buffer
-
toString
public java.lang.String toString()
debug only- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-