Package io.undertow.connector
Interface ByteBufferPool
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
DefaultByteBufferPool,XnioByteBufferPool
public interface ByteBufferPool extends java.io.CloseableA pool of byte buffers- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Instance Methods Abstract 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
PooledByteBuffer allocate()
-
getArrayBackedPool
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:
- An array backed pool of the same size
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
getBufferSize
int getBufferSize()
-
isDirect
boolean isDirect()
-
-