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
Pool
Mind 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>
IOException
public void release(IOPool.Entry<E> resource) throws IOException
Pool
release
in interface Pool<IOPool.Entry<E extends IOPool.Entry<E>>,IOException>
resource
- a resource.IOException
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.