public abstract class BufferSupplier extends Object implements AutoCloseable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
BufferSupplier.GrowableBufferSupplier
Simple buffer supplier for single-threaded usage.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static BufferSupplier |
NO_CACHING |
| 构造器和说明 |
|---|
BufferSupplier() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
close()
Release all resources associated with this supplier.
|
static BufferSupplier |
create() |
abstract ByteBuffer |
get(int capacity)
Supply a buffer with the required capacity.
|
abstract void |
release(ByteBuffer buffer)
Return the provided buffer to be reused by a subsequent call to `get`.
|
public static final BufferSupplier NO_CACHING
public static BufferSupplier create()
public abstract ByteBuffer get(int capacity)
public abstract void release(ByteBuffer buffer)
public abstract void close()
close 在接口中 AutoCloseableCopyright © 2020 Joyqueue Community. All rights reserved.