oemware.core.pool
Class ByteBufferPoolableObjectFactory
java.lang.Object
oemware.core.pool.ByteBufferPoolableObjectFactory
- All Implemented Interfaces:
- org.apache.commons.pool.PoolableObjectFactory
public class ByteBufferPoolableObjectFactory
- extends java.lang.Object
- implements org.apache.commons.pool.PoolableObjectFactory
The byte buffer object factory.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferPoolableObjectFactory
public ByteBufferPoolableObjectFactory(int pBufferSize)
- Construct the object and set the size of the buffer.
- Parameters:
pBufferSize - The buffer size in bytes.
ByteBufferPoolableObjectFactory
public ByteBufferPoolableObjectFactory(int pBufferSize,
boolean pUseDirect)
- Construct the object and set the size of the buffer.
- Parameters:
pBufferSize - The buffer size in bytes.pUseDirect - Set to true to use direct memory.
makeObject
public final java.lang.Object makeObject()
- Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory
validateObject
public final boolean validateObject(java.lang.Object pObject)
- Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory
activateObject
public final void activateObject(java.lang.Object pObject)
- Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory
destroyObject
public final void destroyObject(java.lang.Object pObject)
- Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
passivateObject
public final void passivateObject(java.lang.Object pObject)
- Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
Copyright © 2009 Deft Labs - Released under LGPL, Version 3.0