Class CachedBufferAllocator
java.lang.Object
net.rubyeye.xmemcached.buffer.CachedBufferAllocator
- All Implemented Interfaces:
BufferAllocator
Deprecated.
Cached IoBuffer allocator,cached buffer in ThreadLocal.
- Author:
- dennis
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a new instance with the default parameters (#DEFAULT_MAX_POOL_SIZE and #DEFAULT_MAX_CACHED_BUFFER_SIZE).CachedBufferAllocator(int maxPoolSize, int maxCachedBufferSize) Deprecated.Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal IoBufferallocate(int requestedCapacity) Deprecated.voiddispose()Deprecated.intDeprecated.intDeprecated.static BufferAllocatorDeprecated.static BufferAllocatornewInstance(int maxPoolSize, int maxCachedBufferSize) Deprecated.final IoBufferwrap(ByteBuffer nioBuffer) Deprecated.
-
Constructor Details
-
CachedBufferAllocator
public CachedBufferAllocator()Deprecated.Creates a new instance with the default parameters (#DEFAULT_MAX_POOL_SIZE and #DEFAULT_MAX_CACHED_BUFFER_SIZE). -
CachedBufferAllocator
public CachedBufferAllocator(int maxPoolSize, int maxCachedBufferSize) Deprecated.Creates a new instance.- Parameters:
maxPoolSize- the maximum number of buffers with the same capacity per thread. 0 disables this limitation.maxCachedBufferSize- the maximum capacity of a cached buffer. A buffer whose capacity is bigger than this value is not pooled. 0 disables this limitation.
-
-
Method Details
-
getMaxPoolSize
public int getMaxPoolSize()Deprecated. -
getMaxCachedBufferSize
public int getMaxCachedBufferSize()Deprecated. -
allocate
Deprecated.- Specified by:
allocatein interfaceBufferAllocator
-
wrap
Deprecated.- Specified by:
wrapin interfaceBufferAllocator
-
dispose
-
newInstance
Deprecated. -
newInstance
Deprecated.
-