public interface SourceSplitPacketAssembler
SourceQuerySplitPacket
instances.Modifier and Type | Method and Description |
---|---|
boolean |
add(SourceQuerySplitPacket packet)
Adds a
SourceQuerySplitPacket to the container. |
int |
count()
count.
|
List<io.netty.buffer.ByteBuf> |
dump()
Dump a snapshot of the current received packets.
|
io.netty.buffer.ByteBuf |
getBuffer()
getBuffer.
|
boolean |
isComplete()
isComplete.
|
default boolean |
isProcessing()
isProcessing.
|
int |
received()
received.
|
void |
reset()
Resets the container back to it's initial state.
|
boolean add(SourceQuerySplitPacket packet)
SourceQuerySplitPacket
to the container. Once an assembler is marked in a completed state, this method throws an IllegalStateException
indicating that it is no longer accepting new packets. reset()
should be calledpacket
- The split-packet to be added. Note that packets can arrive at different order,
as long as both the container and the split-packet are in a valid state, then calling this method should not fail.true
if after calling this method caused the assembler in completed state (all split-packets have been received), false
if not yet completed.IllegalStateException
- If the assembler has not been initialized or has already been marked as completed.IndexOutOfBoundsException
- if the packet is not within bounds of the pre-allocated bufferdefault boolean isProcessing()
isProcessing.
true
if the assembler is currently processing split-packets. This is similar to calling size() > 0 && !isComplete()
received()
,
isComplete()
int received()
received.
boolean isComplete()
isComplete.
true
if the container is now in completed state (all packets have been received). false
if either the container has not
been initialized (not collecting) or if the container is not yet marked in a completed statereset()
,
getBuffer()
io.netty.buffer.ByteBuf getBuffer()
getBuffer.
ByteBuf
containing the re-assembled packets.IllegalStateException
- is the assembler is not yet in a completed stateint count()
count.
void reset()
isComplete()
Copyright © 2016–2024. All rights reserved.