protected static class FRAG2.FragEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.locks.Lock |
lock |
Modifier | Constructor and Description |
---|---|
protected |
FragEntry(int tot_frags)
Creates a new entry
|
Modifier and Type | Method and Description |
---|---|
protected Message |
assembleMessage()
Assembles all the fragments into one buffer.
|
boolean |
isComplete()
returns true if this fragmentation is complete
ie, all fragmentations have been received for this buffer
|
void |
lock()
Use to synchronize on FragEntry
|
void |
set(int frag_id,
Message frag)
adds on fragmentation buffer to the message
|
java.lang.String |
toString() |
void |
unlock() |
protected FragEntry(int tot_frags)
tot_frags
- the number of fragments to expect for this messagepublic void lock()
public void unlock()
public void set(int frag_id, Message frag)
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 nullpublic boolean isComplete()
protected Message assembleMessage()
isComplete()
to verify
before calling this method)public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1998-2020 Red Hat. All Rights Reserved.