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 the
ByteBuf.getBytes(int, ByteBuf, int, int)
method for heap buffers.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanacceptsMemoryAddress(T context) default booleanpreferArrayOrMemoryAddress(T context) voidvisitArray(T context, byte[] visitArray, int visitIndex, int visitLength) voidvisitBuffer(T context, io.netty.buffer.ByteBuf visitBuffer, int visitIndex, int visitLength)
-
Method Details
-
visitBuffer
-
visitArray
-
preferArrayOrMemoryAddress
-
acceptsMemoryAddress
-