@ThreadSafe public final class MemoryBufferPool extends IoBufferPool
| Constructor and Description |
|---|
MemoryBufferPool(int initialCapacity)
Constructs a new memory buffer pool.
|
| Modifier and Type | Method and Description |
|---|---|
IoBuffer |
allocate()
Allocates a resource from this pool.
|
int |
size()
Returns the number of memory buffers allocated but not yet released from
this pool.
|
releaseequals, hashCodepublic MemoryBufferPool(int initialCapacity)
initialCapacity - the initial capacity of the byte buffer to use
for writing to an allocated memory buffer.public IoBuffer allocate()
PoolMind that a pool implementation should not hold references to its allocated resources because this could cause a memory leak.
public int size()
Copyright © 2012–2018 Schlichtherle IT Services. All rights reserved.