| org.xsocket.connection.spi.IMemoryManager
All known Subclasses: org.xsocket.connection.spi.AbstractMemoryManager,
IMemoryManager | interface IMemoryManager (Code) | | memory manager
author: grro |
acquireMemoryMinSize | public ByteBuffer acquireMemoryMinSize(int minSize)(Code) | | acquire ByteBuffer with free memory
Parameters: minSize - minimal buffer size the ByteBuffer with free memory |
acquireMemoryStandardSizeOrPreallocated | public ByteBuffer acquireMemoryStandardSizeOrPreallocated(int standardsize)(Code) | | acquire ByteBuffer with free memory
Parameters: standardsize - the standard size the ByteBuffer with free memory |
extractAndRecycleMemory | public ByteBuffer extractAndRecycleMemory(ByteBuffer buffer, int read)(Code) | | extract the read data and recycle the remaining ByteBuffer (if remaining larger than min size)
Parameters: buffer - the ByteBuffer to recycle Parameters: read - the readSize the read data |
getCurrentSizePreallocatedBuffer | public int getCurrentSizePreallocatedBuffer()(Code) | | get the current free preallocated buffer size
the current free preallocated buffer size |
getPreallocatedMinBufferSize | public Integer getPreallocatedMinBufferSize()(Code) | | gets the minimum size of a preallocated buffer
the min size of a preallocated buffer |
gettPreallocationBufferSize | public Integer gettPreallocationBufferSize()(Code) | | gets the preallocation size
the preallocation size |
isDirect | public boolean isDirect()(Code) | | returns if direct buffer should be allocated
true, if is direct |
isPreallocationMode | public boolean isPreallocationMode()(Code) | | returns true, if memory manager runs in preallocation mode
the preallocation mode |
preallocate | public void preallocate()(Code) | | preallocate, if preallocated size is smaller the given minSize
|
recycleMemory | public void recycleMemory(ByteBuffer buffer)(Code) | | recycle a ByteBuffer.
Parameters: buffer - the ByteBuffer to recycle |
setDirect | public void setDirect(boolean isDirect)(Code) | | sets if direct buffer should be allocated
Parameters: isDirect - true, if buffer is direct |
setPreallocatedMinBufferSize | public void setPreallocatedMinBufferSize(Integer minSize)(Code) | | sets the minimum size of a preallocated buffer
Parameters: minSize - the min size of a preallocated buffer |
setPreallocationBufferSize | public void setPreallocationBufferSize(Integer preallocationSize)(Code) | | set the preallocation size
Parameters: preallocationSize - the preallocation size |
setPreallocationMode | public void setPreallocationMode(boolean mode)(Code) | | sets the preallocation mode
Parameters: mode - the mode |
|
|