Package org.apache.bookkeeper.util
Interface ByteBufVisitor.ByteBufVisitorCallback<T>
-
- Enclosing class:
- ByteBufVisitor
public static interface ByteBufVisitor.ByteBufVisitorCallback<T>
The callback interface for visiting buffers. In case of a heap buffer that is backed by an byte[] array, the visitArray method is called. This is due to the internal implementation detail of theByteBuf.getBytes(int, ByteBuf, int, int)
method for heap buffers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
acceptsMemoryAddress(T context)
default boolean
preferArrayOrMemoryAddress(T context)
void
visitArray(T context, byte[] visitArray, int visitIndex, int visitLength)
void
visitBuffer(T context, io.netty.buffer.ByteBuf visitBuffer, int visitIndex, int visitLength)
-
-
-
Method Detail
-
visitBuffer
void visitBuffer(T context, io.netty.buffer.ByteBuf visitBuffer, int visitIndex, int visitLength)
-
visitArray
void visitArray(T context, byte[] visitArray, int visitIndex, int visitLength)
-
preferArrayOrMemoryAddress
default boolean preferArrayOrMemoryAddress(T context)
-
acceptsMemoryAddress
default boolean acceptsMemoryAddress(T context)
-
-