Top Fields Constructors Methods
io.undertow.server

public Class XnioByteBufferPool

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

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
private final int
private final boolean
private final Pool<ByteBuffer>
pool

References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor Summary

AccessConstructor and Description
public
XnioByteBufferPool(Pool<ByteBuffer> pool)
References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public PooledByteBuffer
public void
close()

Implements io.undertow.connector.ByteBufferPool.close.

Closes this stream and releases any system resources associated with it.

public ByteBufferPool
getArrayBackedPool()

Implements io.undertow.connector.ByteBufferPool.getArrayBackedPool.

If this byte buffer pool corresponds to an array backed pool then this will return itself.

public int
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayBackedPoolback to summary
private final ByteBufferPool arrayBackedPool
bufferSizeback to summary
private final int bufferSize
directback to summary
private final boolean direct
poolback to summary
private final Pool<ByteBuffer> pool

References Deprecated

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

See corresponding docs for further information.

Constructor Detail

XnioByteBufferPoolback to summary
public XnioByteBufferPool(Pool<ByteBuffer> pool)

References Deprecated

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

See corresponding docs for further information.

Method Detail

allocateback to summary
public PooledByteBuffer allocate()

Implements io.undertow.connector.ByteBufferPool.allocate.

Annotations
@Override
closeback to summary
public void close()

Implements io.undertow.connector.ByteBufferPool.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
getArrayBackedPoolback to summary
public ByteBufferPool getArrayBackedPool()

Implements io.undertow.connector.ByteBufferPool.getArrayBackedPool.

Doc from io.undertow.connector.ByteBufferPool.getArrayBackedPool.

If this byte buffer pool corresponds to an array backed pool then this will return itself. Otherwise it will return an array backed pool that contains buffers of the same size.

Returns:ByteBufferPool

An array backed pool of the same size

Annotations
@Override
getBufferSizeback to summary
public int getBufferSize()

Implements io.undertow.connector.ByteBufferPool.getBufferSize.

Annotations
@Override
isDirectback to summary
public boolean isDirect()

Implements io.undertow.connector.ByteBufferPool.isDirect.

Annotations
@Override