Top Fields Constructors Methods
io.undertow.util

public Class PooledAdaptor

extends Object
implements Pooled<ByteBuffer>
Class Inheritance
All Implemented Interfaces
org.xnio.Pooled, java.lang.AutoCloseable
Imports
io.undertow.connector.PooledByteBuffer, org.xnio.Pooled, java.nio.ByteBuffer

References Deprecated

Pooled is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final PooledByteBuffer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.xnio.Pooled.close.

Delegates to free().

public void
discard()

Implements org.xnio.Pooled.discard.

Discard this resource.

public void
free()

Implements org.xnio.Pooled.free.

Free this resource for immediate re-use.

public ByteBuffer
getResource()

Implements org.xnio.Pooled.getResource.

Get the pooled resource.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bufferback to summary
private final PooledByteBuffer buffer

Constructor Detail

PooledAdaptorback to summary
public PooledAdaptor(PooledByteBuffer buffer)

Method Detail

closeback to summary
public void close()

Implements org.xnio.Pooled.close.

Doc from org.xnio.Pooled.close.

Delegates to free().

Annotations
@Override
discardback to summary
public void discard()

Implements org.xnio.Pooled.discard.

Doc from org.xnio.Pooled.discard.

Discard this resource. Any backing resources corresponding to this pooled resource will be rendered unavailable until the pooled resource has been garbage-collected.

Annotations
@Override
freeback to summary
public void free()

Implements org.xnio.Pooled.free.

Doc from org.xnio.Pooled.free.

Free this resource for immediate re-use. The resource must not be accessed again after calling this method; if it is possible that an instance is still in use, you must call discard() instead.

Annotations
@Override
getResourceback to summary
public ByteBuffer getResource() throws IllegalStateException

Implements org.xnio.Pooled.getResource.

Doc from org.xnio.Pooled.getResource.

Get the pooled resource.

Returns:ByteBuffer

the pooled resource

Annotations
@Override
Exceptions
IllegalStateException:
if the resource has been freed or discarded already
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override