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 PooledByteBuffer
allocate()
void
close()
ByteBufferPool
getArrayBackedPool()
If this byte buffer pool corresponds to an array backed pool then this will return itself.int
getBufferSize()
boolean
isDirect()
-
-
-
Method Detail
-
allocate
public PooledByteBuffer allocate()
- Specified by:
allocate
in interfaceByteBufferPool
-
getArrayBackedPool
public ByteBufferPool getArrayBackedPool()
Description copied from interface:ByteBufferPool
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.- Specified by:
getArrayBackedPool
in interfaceByteBufferPool
- Returns:
- An array backed pool of the same size
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceByteBufferPool
- Specified by:
close
in interfacejava.io.Closeable
-
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interfaceByteBufferPool
-
isDirect
public boolean isDirect()
- Specified by:
isDirect
in interfaceByteBufferPool
-
-