IMessageBuffer

interface IMessageBuffer : IRetainableMessageBufferReader

Buffer used to reconstruct messages from the data channel

Functions

Link copied to clipboard
abstract fun asBuffer(): ByteBuffer

Expose this message buffer as a read-only bytebuffer. If the message buffer is backed by a file, it will be mapped into memory

Link copied to clipboard
abstract fun asReader(): IMessageBufferReader

Returns an IMessageBufferReader for this buffer

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
abstract fun complete(length: Int)

Closes the buffer for writing and sets the final byte length

Link copied to clipboard
abstract fun position(loc: Int): IMessageBuffer

Sets the current write position in the buffer

Link copied to clipboard
abstract fun put(data: ByteBuffer): IMessageBuffer

Writes data to the buffer starting at the current position

Link copied to clipboard
abstract fun release()

Release resources retained when retain is called

Link copied to clipboard
abstract fun retain()

Retain owned resources until release is called

Link copied to clipboard
open fun write(to: FileChannel): Int

Write this message buffer to the provided file channel

Properties

Link copied to clipboard
abstract val isPooled: Boolean

Indicates that the buffer is a part of a managed buffer pool

Link copied to clipboard
abstract val limit: Int

Capacity of the buffer

Link copied to clipboard
abstract val size: Int

Size of the buffer