接口 PooledDataBuffer
- 所有超级接口:
DataBuffer
- 所有已知实现类:
NettyDataBuffer
public interface PooledDataBuffer extends DataBuffer
Extension ofDataBuffer
that allows for buffer that share a memory pool. Introduces methods for reference counting.- 从以下版本开始:
- 5.0
- 作者:
- Arjen Poutsma
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 boolean
isAllocated()
Returntrue
if this buffer is allocated;false
if it has been deallocated.boolean
release()
Decrease the reference count for this buffer by one, and deallocate it once the count reaches zero.PooledDataBuffer
retain()
Increase the reference count for this buffer by one.从接口继承的方法 org.springframework.core.io.buffer.DataBuffer
asByteBuffer, asByteBuffer, asInputStream, asInputStream, asOutputStream, capacity, capacity, ensureCapacity, factory, getByte, indexOf, lastIndexOf, read, read, read, readableByteCount, readPosition, readPosition, retainedSlice, slice, toString, toString, writableByteCount, write, write, write, write, write, write, writePosition, writePosition
方法详细资料
isAllocated
boolean isAllocated()
Returntrue
if this buffer is allocated;false
if it has been deallocated.- 从以下版本开始:
- 5.1
retain
PooledDataBuffer retain()
Increase the reference count for this buffer by one.- 返回:
- this buffer
release
boolean release()
Decrease the reference count for this buffer by one, and deallocate it once the count reaches zero.- 返回:
true
if the buffer was deallocated;false
otherwise