com.kenai.jaffl.util
Class SimpleBufferPool
java.lang.Object
com.kenai.jaffl.util.SimpleBufferPool
- All Implemented Interfaces:
- BufferPool
public class SimpleBufferPool
- extends Object
- implements BufferPool
Constructor Summary |
SimpleBufferPool(BufferPool parent,
int bufferSize,
int poolSize)
Creates a new instance of SimpleBufferPool |
SimpleBufferPool(int bufferSize,
int poolSize)
Creates a new instance of SimpleBufferPool |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleBufferPool
public SimpleBufferPool(int bufferSize,
int poolSize)
- Creates a new instance of SimpleBufferPool
- Parameters:
bufferSize
- The Size of ByteBuffer this pool should returnpoolSize
- The maximum number of ByteBuffers to cache
SimpleBufferPool
public SimpleBufferPool(BufferPool parent,
int bufferSize,
int poolSize)
- Creates a new instance of SimpleBufferPool
- Parameters:
parent
- The parent pool from which to to fetch/return extra buffers.bufferSize
- The Size of ByteBuffer this pool should return.poolSize
- The maximum number of ByteBuffers to cache.
get
public ByteBuffer get(int size)
- Specified by:
get
in interface BufferPool
put
public void put(ByteBuffer buf)
- Specified by:
put
in interface BufferPool
putAll
public void putAll(List<ByteBuffer> list)
- Specified by:
putAll
in interface BufferPool
Copyright © 2011. All Rights Reserved.