|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.output.hdf5.PacketPoolSimple
@Deprecated public class PacketPoolSimple
A very simplistic pooling class for packets for use by the HDF output module only. It assumes good behavior by the user -- packets are created and given away and then the expectation is the user will put them back in the pool when done... if not they are lost to the garbage collector. This implements a single list of fixed max sized packets which are always resized to asked for size. Then when they are put back on the queue, they are resized back to their maximum. Chews up memory ... essentially deprecated.
Field Summary | |
---|---|
private static int |
CCSDSMaxSize
Deprecated. |
private static int |
CCSDSMinSize
Deprecated. |
private static java.util.LinkedList<Packet> |
pool
Deprecated. |
private static int |
totalCreated
Deprecated. |
Constructor Summary | |
---|---|
PacketPoolSimple()
Deprecated. |
Method Summary | |
---|---|
void |
drain()
Deprecated. Return all packets in the pool back to the Java heap. |
void |
flush(java.util.List<Packet> packetList)
Deprecated. Take all the packets on the supplied list and hang them on the internal pool list |
Packet |
get(int size)
Deprecated. Ask for a get a packet of size |
void |
preen()
Deprecated. Clean up the pool in some way |
void |
put(Packet packet)
Deprecated. Give the packet to the pool for storage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int CCSDSMaxSize
private static final int CCSDSMinSize
private static java.util.LinkedList<Packet> pool
private static int totalCreated
Constructor Detail |
---|
public PacketPoolSimple()
Method Detail |
---|
public Packet get(int size) throws RtStpsException
get
in interface PacketPool
size
- size in bytes needed hold packet including header and body
RtStpsException
- If size is not legalpublic void put(Packet packet) throws RtStpsException
put
in interface PacketPool
packet
-
RtStpsException
- If illegal sizepublic void flush(java.util.List<Packet> packetList) throws RtStpsException
flush
in interface PacketPool
packetList
- the list of packets to put on the pool
RtStpsException
public void drain()
PacketPool
drain
in interface PacketPool
public void preen()
PacketPool
preen
in interface PacketPool
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |