Class RetainableByteBuffer.DynamicCapacity

All Implemented Interfaces:
Retainable, RetainableByteBuffer, RetainableByteBuffer.Mutable
Enclosing interface:
RetainableByteBuffer

public static class RetainableByteBuffer.DynamicCapacity extends RetainableByteBuffer.Abstract implements RetainableByteBuffer.Mutable
An RetainableByteBuffer.Mutable RetainableByteBuffer that can grow its capacity, backed by a chain of ByteBuffer, which may grow either by aggregation and/or retention. When retaining, a chain of zero copy buffers are kept. When aggregating, this class avoid repetitive copies of the same data during growth by aggregating to a chain of buffers, which are only copied to a single buffer if required. If the minRetainSize is {code 0}, then appending to this buffer will always retain and accumulate. If the minRetainSize is Integer.MAX_VALUE, then appending to this buffer will always aggregate.