public class PacketOrderer extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
PacketOrderer.Packet
Class for storing packet in wait list
|
| Constructor and Description |
|---|
PacketOrderer(OutOfOrderListener outOfOrderListener,
int orderingTimeoutInSeconds)
Constructs the class
|
| Modifier and Type | Method and Description |
|---|---|
List<com.fasterxml.jackson.databind.JsonNode> |
restoreOrder(com.fasterxml.jackson.databind.JsonNode packet)
Processes the packet and resolves in the order of packet sequence number
|
void |
start()
Initializes the packet orderer
|
void |
stop()
Deinitialized the packet orderer
|
public PacketOrderer(OutOfOrderListener outOfOrderListener, int orderingTimeoutInSeconds)
outOfOrderListener - listener which will receive out of order packet eventsorderingTimeoutInSeconds - packet ordering timeoutpublic void start()
public void stop()
public List<com.fasterxml.jackson.databind.JsonNode> restoreOrder(com.fasterxml.jackson.databind.JsonNode packet)
packet - packet to processCopyright © 2021. All rights reserved.