public class PooledAdaptor extends Object implements Pooled<ByteBuffer>
Constructor and Description |
---|
PooledAdaptor(PooledByteBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Delegates to
Pooled.free() . |
void |
discard()
Discard this resource.
|
void |
free()
Free this resource for immediate re-use.
|
ByteBuffer |
getResource()
Get the pooled resource.
|
public PooledAdaptor(PooledByteBuffer buffer)
public void discard()
Pooled
discard
in interface Pooled<ByteBuffer>
public void free()
Pooled
Pooled.discard()
instead.free
in interface Pooled<ByteBuffer>
public ByteBuffer getResource() throws IllegalStateException
Pooled
getResource
in interface Pooled<ByteBuffer>
IllegalStateException
- if the resource has been freed or discarded alreadypublic void close()
Pooled
Pooled.free()
.close
in interface AutoCloseable
close
in interface Pooled<ByteBuffer>
Copyright © 2020 JBoss by Red Hat. All rights reserved.