Package org.eclipse.jetty.io
Class ByteBufferPool.Bucket
- java.lang.Object
-
- org.eclipse.jetty.io.ByteBufferPool.Bucket
-
- Enclosing interface:
- ByteBufferPool
public static class ByteBufferPool.Bucket extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Bucket(ByteBufferPool pool, int capacity, int maxSize)
Deprecated.Bucket(ByteBufferPool pool, int capacity, int maxSize, java.util.function.IntConsumer memoryFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.nio.ByteBuffer
acquire()
java.nio.ByteBuffer
acquire(boolean direct)
Deprecated.useacquire()
insteadvoid
clear()
void
release(java.nio.ByteBuffer buffer)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Bucket
@Deprecated public Bucket(ByteBufferPool pool, int capacity, int maxSize)
Deprecated.
-
Bucket
public Bucket(ByteBufferPool pool, int capacity, int maxSize, java.util.function.IntConsumer memoryFunction)
-
-
Method Detail
-
acquire
public java.nio.ByteBuffer acquire()
-
acquire
@Deprecated public java.nio.ByteBuffer acquire(boolean direct)
Deprecated.useacquire()
instead- Parameters:
direct
- whether to create a direct buffer when none is available- Returns:
- a ByteBuffer
-
release
public void release(java.nio.ByteBuffer buffer)
-
clear
public void clear()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-