Package io.undertow.server
Class XnioByteBufferPool
- java.lang.Object
-
- io.undertow.server.XnioByteBufferPool
-
- All Implemented Interfaces:
ByteBufferPool,java.io.Closeable,java.lang.AutoCloseable
public class XnioByteBufferPool extends java.lang.Object implements ByteBufferPool
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description XnioByteBufferPool(org.xnio.Pool<java.nio.ByteBuffer> pool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PooledByteBufferallocate()voidclose()ByteBufferPoolgetArrayBackedPool()If this byte buffer pool corresponds to an array backed pool then this will return itself.intgetBufferSize()booleanisDirect()
-
-
-
Method Detail
-
allocate
public PooledByteBuffer allocate()
- Specified by:
allocatein interfaceByteBufferPool
-
getArrayBackedPool
public ByteBufferPool getArrayBackedPool()
Description copied from interface:ByteBufferPoolIf 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.- Specified by:
getArrayBackedPoolin interfaceByteBufferPool- Returns:
- An array backed pool of the same size
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceByteBufferPool- Specified by:
closein interfacejava.io.Closeable
-
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSizein interfaceByteBufferPool
-
isDirect
public boolean isDirect()
- Specified by:
isDirectin interfaceByteBufferPool
-
-