E - the type of the I/O buffers.D - the type of the instrumenting director.@Immutable public class InstrumentingIOPool<E extends IOPool.Entry<E>,D extends InstrumentingDirector<D>> extends Object implements IOPool<E>
| Modifier and Type | Class and Description |
|---|---|
class |
InstrumentingIOPool.Buffer |
IOPool.Entry<E extends IOEntry<E>>Pool.Releasable<X extends Exception>| Modifier and Type | Field and Description |
|---|---|
protected IOPool<E> |
delegate |
protected D |
director |
| Constructor and Description |
|---|
InstrumentingIOPool(IOPool<E> pool,
D director) |
| Modifier and Type | Method and Description |
|---|---|
IOPool.Entry<E> |
allocate()
Allocates a resource from this pool.
|
void |
release(IOPool.Entry<E> resource)
Releases a previously allocated resource to this pool.
|
String |
toString() |
protected final IOPool<E extends IOPool.Entry<E>> delegate
protected final D extends InstrumentingDirector<D> director
public IOPool.Entry<E> allocate() throws IOException
PoolMind that a pool implementation should not hold references to its allocated resources because this could cause a memory leak.
allocate in interface Pool<IOPool.Entry<E extends IOPool.Entry<E>>,IOException>IOExceptionpublic void release(IOPool.Entry<E> resource) throws IOException
PoolIllegalArgumentException or an
IllegalStateException upon the conditions explained below.release in interface Pool<IOPool.Entry<E extends IOPool.Entry<E>>,IOException>resource - a resource.IOExceptionCopyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.