Package io.undertow.connector
Interface ByteBufferPool
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
DefaultByteBufferPool
,XnioByteBufferPool
public interface ByteBufferPool extends Closeable
A pool of byte buffers- Author:
- Stuart Douglas
-
-
Method Summary
All Methods Instance Methods Abstract 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
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getBufferSize
int getBufferSize()
-
isDirect
boolean isDirect()
-
-