|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PacketPool
A packet pool manages a pool of packets for reuse. It does not track where the packet have gone and leaves it up to user to ensure good behavior and put no longer needed packets back in the pool.
Method Summary | |
---|---|
void |
drain()
Return all packets in the pool back to the Java heap. |
void |
flush(java.util.List<Packet> packetList)
Take all the packets on the supplied list and hang them on the internal pool list |
Packet |
get(int size)
Get a packet of size |
void |
preen()
Clean up the pool in some way |
void |
put(Packet packet)
Give the packet to the pool for storage |
Method Detail |
---|
Packet get(int size) throws RtStpsException
size
- size in bytes needed hold packet including header and body
RtStpsException
- If size is not legalvoid put(Packet packet) throws RtStpsException
packet
-
RtStpsException
- If illegal sizevoid flush(java.util.List<Packet> packetList) throws RtStpsException
packetList
- the list of packets to put on the pool
RtStpsException
- if this failsvoid preen()
void drain()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |