Package org.apache.drill.exec.memory
Class DrillByteBufAllocator
java.lang.Object
io.netty.buffer.AbstractByteBufAllocator
org.apache.drill.exec.memory.DrillByteBufAllocator
- All Implemented Interfaces:
io.netty.buffer.ByteBufAllocator
public class DrillByteBufAllocator
extends io.netty.buffer.AbstractByteBufAllocator
An extend of AbstractByteBufAllocator that wraps a Drill BufferAllocator. This allows the RPC layer to be accounted
and managed using Drill's BufferAllocator infrastructure. The only thin different from a typical BufferAllocator is
the signature and the fact that this Allocator returns ExpandableByteBufs which enable otherwise non-expandable
DrillBufs to be expandable.
Beside it, DrillByteBufAllocator uses PooledByteBufAllocatorL.InnerAllocator as allocator only for heapBuffer's for
netty's purposes, when it directly calls heapBuffer methods.
-
Field Summary
Fields inherited from interface io.netty.buffer.ByteBufAllocator
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufbuffer()io.netty.buffer.ByteBufbuffer(int initialCapacity) io.netty.buffer.ByteBufbuffer(int initialCapacity, int maxCapacity) io.netty.buffer.CompositeByteBufio.netty.buffer.CompositeByteBufcompositeBuffer(int maxNumComponents) io.netty.buffer.CompositeByteBufio.netty.buffer.CompositeByteBufcompositeDirectBuffer(int maxNumComponents) io.netty.buffer.CompositeByteBufio.netty.buffer.CompositeByteBufcompositeHeapBuffer(int maxNumComponents) io.netty.buffer.ByteBufio.netty.buffer.ByteBufdirectBuffer(int initialCapacity) io.netty.buffer.ByteBufdirectBuffer(int initialCapacity, int maxCapacity) io.netty.buffer.ByteBufioBuffer()io.netty.buffer.ByteBufioBuffer(int initialCapacity) io.netty.buffer.ByteBufioBuffer(int initialCapacity, int maxCapacity) booleanprotected io.netty.buffer.ByteBufnewDirectBuffer(int initialCapacity, int maxCapacity) protected io.netty.buffer.ByteBufnewHeapBuffer(int initialCapacity, int maxCapacity) Methods inherited from class io.netty.buffer.AbstractByteBufAllocator
calculateNewCapacity, heapBuffer, heapBuffer, heapBuffer, toLeakAwareBuffer, toLeakAwareBuffer, toString
-
Constructor Details
-
DrillByteBufAllocator
-
-
Method Details
-
buffer
public io.netty.buffer.ByteBuf buffer()- Specified by:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity) - Specified by:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity, int maxCapacity) - Specified by:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
ioBuffer
public io.netty.buffer.ByteBuf ioBuffer()- Specified by:
ioBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
ioBufferin classio.netty.buffer.AbstractByteBufAllocator
-
ioBuffer
public io.netty.buffer.ByteBuf ioBuffer(int initialCapacity) - Specified by:
ioBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
ioBufferin classio.netty.buffer.AbstractByteBufAllocator
-
ioBuffer
public io.netty.buffer.ByteBuf ioBuffer(int initialCapacity, int maxCapacity) - Specified by:
ioBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
ioBufferin classio.netty.buffer.AbstractByteBufAllocator
-
directBuffer
public io.netty.buffer.ByteBuf directBuffer()- Specified by:
directBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
directBufferin classio.netty.buffer.AbstractByteBufAllocator
-
directBuffer
public io.netty.buffer.ByteBuf directBuffer(int initialCapacity) - Specified by:
directBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
directBufferin classio.netty.buffer.AbstractByteBufAllocator
-
directBuffer
public io.netty.buffer.ByteBuf directBuffer(int initialCapacity, int maxCapacity) - Specified by:
directBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
directBufferin classio.netty.buffer.AbstractByteBufAllocator
-
compositeBuffer
public io.netty.buffer.CompositeByteBuf compositeBuffer()- Specified by:
compositeBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeBufferin classio.netty.buffer.AbstractByteBufAllocator
-
compositeBuffer
public io.netty.buffer.CompositeByteBuf compositeBuffer(int maxNumComponents) - Specified by:
compositeBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeBufferin classio.netty.buffer.AbstractByteBufAllocator
-
compositeDirectBuffer
public io.netty.buffer.CompositeByteBuf compositeDirectBuffer()- Specified by:
compositeDirectBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeDirectBufferin classio.netty.buffer.AbstractByteBufAllocator
-
compositeDirectBuffer
public io.netty.buffer.CompositeByteBuf compositeDirectBuffer(int maxNumComponents) - Specified by:
compositeDirectBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeDirectBufferin classio.netty.buffer.AbstractByteBufAllocator
-
newHeapBuffer
protected io.netty.buffer.ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) - Specified by:
newHeapBufferin classio.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected io.netty.buffer.ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) - Specified by:
newDirectBufferin classio.netty.buffer.AbstractByteBufAllocator
-
isDirectBufferPooled
public boolean isDirectBufferPooled() -
compositeHeapBuffer
public io.netty.buffer.CompositeByteBuf compositeHeapBuffer()- Specified by:
compositeHeapBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeHeapBufferin classio.netty.buffer.AbstractByteBufAllocator
-
compositeHeapBuffer
public io.netty.buffer.CompositeByteBuf compositeHeapBuffer(int maxNumComponents) - Specified by:
compositeHeapBufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
compositeHeapBufferin classio.netty.buffer.AbstractByteBufAllocator
-