public class RpcPacketPool extends Object
Contains a pool of small and large RpcPacket objects for use by multi-threaded RPC servers.
Modifier and Type | Field and Description |
---|---|
static int |
DefaultLargeLimit |
static int |
DefaultLargeSize |
static int |
DefaultSmallLimit |
static int |
DefaultSmallSize |
Constructor and Description |
---|
RpcPacketPool()
Default constructor
|
RpcPacketPool(int largeSize,
int largeLimit)
Class constructor
|
RpcPacketPool(int smallSize,
int smallLimit,
int largeSize,
int largeLimit)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
RpcPacket |
allocatePacket(int reqSize)
Allocate a packet from the packet pool
|
int |
availableLargePackets()
Return the count of available large packets
|
int |
availableSmallPackets()
Return the count of available small packets
|
int |
getLargePacketAllocationLimit()
Return the large packet allocation limit
|
int |
getLargePacketCount()
Return the count of allocated large packets
|
int |
getLargePacketSize()
Return the large packet size
|
int |
getSmallPacketAllocationLimit()
Return the small packet allocation limit
|
int |
getSmallPacketCount()
Return the count of allocated small packets
|
int |
getSmallPacketSize()
Return the small packet size
|
void |
releasePacket(RpcPacket pkt)
Release an RPC packet back to the pool
|
public static final int DefaultSmallSize
public static final int DefaultLargeSize
public static final int DefaultSmallLimit
public static final int DefaultLargeLimit
public RpcPacketPool()
public RpcPacketPool(int smallSize, int smallLimit, int largeSize, int largeLimit)
smallSize
- intsmallLimit
- intlargeSize
- intlargeLimit
- intpublic RpcPacketPool(int largeSize, int largeLimit)
largeSize
- intlargeLimit
- intpublic final int getSmallPacketSize()
public final int getSmallPacketCount()
public final int getSmallPacketAllocationLimit()
public final int availableLargePackets()
public final int getLargePacketSize()
public final int getLargePacketCount()
public final int getLargePacketAllocationLimit()
public final int availableSmallPackets()
public final RpcPacket allocatePacket(int reqSize)
reqSize
- intpublic final void releasePacket(RpcPacket pkt)
pkt
- RpcPacketCopyright © 2005–2017 Alfresco Software. All rights reserved.