Top Description Methods
org.springframework.core.io.buffer

public Interface PooledDataBuffer

extends TouchableDataBuffer
Known Direct Implementers
org.springframework.core.io.buffer.NettyDataBuffer

Extension of DataBuffer that allows for buffers that share a memory pool. Introduces methods for reference counting.
Author
Arjen Poutsma
Since
5.0

Method Summary

Modifier and TypeMethod and Description
public boolean
isAllocated()

Return true if this buffer is allocated; false if it has been deallocated.

public boolean

Returns:

true if the buffer was deallocated; false otherwise
release
()

Decrease the reference count for this buffer by one, and deallocate it once the count reaches zero.

public PooledDataBuffer

Returns:

this buffer
retain
()

Increase the reference count for this buffer by one.

public PooledDataBuffer

Returns:

this buffer
touch
(Object hint)

Redeclares org.springframework.core.io.buffer.TouchableDataBuffer.touch.

Associate the given hint with the data buffer for debugging purposes.

Method Detail

isAllocatedback to summary
public boolean isAllocated()

Return true if this buffer is allocated; false if it has been deallocated.

Since
5.1
releaseback to summary
public boolean release()

Decrease the reference count for this buffer by one, and deallocate it once the count reaches zero.

Returns:boolean

true if the buffer was deallocated; false otherwise

retainback to summary
public PooledDataBuffer retain()

Increase the reference count for this buffer by one.

Returns:PooledDataBuffer

this buffer

touchback to summary
public PooledDataBuffer touch(Object hint)

Redeclares org.springframework.core.io.buffer.TouchableDataBuffer.touch.

Associate the given hint with the data buffer for debugging purposes.

Returns:PooledDataBuffer

this buffer

Annotations
@Override
Since
5.3.2