public class CIFSPacketPool
extends java.lang.Object
Allocates buffers from the main byte buffer pool and wraps them in a CIFS specific packet.
| Modifier and Type | Field and Description |
|---|---|
static long |
CIFSAllocateWaitTime |
static long |
CIFSLeaseTime |
static long |
CIFSLeaseTimeSecs |
| Constructor and Description |
|---|
CIFSPacketPool(ByteBufferPool bufPool,
ThreadRequestPool threadPool)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
SMBSrvPacket |
allocatePacket(int reqSiz)
Allocate a CIFS packet with the specified buffer size
|
SMBSrvPacket |
allocatePacket(int reqSiz,
SMBSrvPacket reqPkt)
Allocate a CIFS packet with the specified buffer size, copy the header from the
request packet
|
SMBSrvPacket |
allocatePacket(int reqSiz,
SMBSrvPacket reqPkt,
int copyLen)
Allocate a CIFS packet with the specified buffer size, copy the header from the
request packet
|
boolean |
allowsOverSizedAllocations()
Check if over sized packet allocations are allowed
|
ByteBufferPool |
getBufferPool()
Get the byte buffer pool
|
int |
getLargestSize()
Return the length of the largest packet size available
|
int |
getMaximumOverSizedAllocation()
Return the maximum size of over sized packet that is allowed
|
int |
getSmallestSize()
Return the length of the smallest packet size available
|
boolean |
hasAllocateDebug()
Check if allocate/release debug is enabled
|
boolean |
hasDebug()
Check if debug output is enabled
|
void |
releasePacket(SMBSrvPacket smbPkt)
Release a CIFS packet buffer back to the pool
|
void |
setAllocateDebug(boolean ena)
Enable/disable allocate/release debug output
|
void |
setAllowOverSizedAllocations(boolean ena)
Enable/disable over sized packet allocations
|
void |
setDebug(boolean ena)
Enable/disable debug output
|
java.lang.String |
toString()
Return the packet pool details as a string
|
public static final long CIFSAllocateWaitTime
public static final long CIFSLeaseTime
public static final long CIFSLeaseTimeSecs
public CIFSPacketPool(ByteBufferPool bufPool, ThreadRequestPool threadPool)
bufPool - byteBufferPoolthreadPool - ThreadRequestPoolpublic final SMBSrvPacket allocatePacket(int reqSiz) throws NoPooledMemoryException
reqSiz - intNoPooledMemoryExceptionpublic final SMBSrvPacket allocatePacket(int reqSiz, SMBSrvPacket reqPkt) throws NoPooledMemoryException
reqSiz - intreqPkt - SMBSrvPacketNoPooledMemoryExceptionpublic final SMBSrvPacket allocatePacket(int reqSiz, SMBSrvPacket reqPkt, int copyLen) throws NoPooledMemoryException
reqSiz - intreqPkt - SMBSrvPacketcopyLen - intNoPooledMemoryExceptionpublic final void releasePacket(SMBSrvPacket smbPkt)
smbPkt - SMBSrvPacketpublic final ByteBufferPool getBufferPool()
public final int getSmallestSize()
public final int getLargestSize()
public final boolean allowsOverSizedAllocations()
public final int getMaximumOverSizedAllocation()
public final void setDebug(boolean ena)
ena - booleanpublic final void setAllocateDebug(boolean ena)
ena - booleanpublic final boolean hasDebug()
public final boolean hasAllocateDebug()
public final void setAllowOverSizedAllocations(boolean ena)
ena - public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.