| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>BufferAllocator (Drill : 1.20.3 API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="BufferAllocator (Drill : 1.20.3 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/BufferAllocator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/drill/exec/memory/BoundsChecking.html" title="class in org.apache.drill.exec.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/drill/exec/memory/DrillByteBufAllocator.html" title="class in org.apache.drill.exec.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/drill/exec/memory/BufferAllocator.html" target="_top">Frames</a></li> |
| <li><a href="BufferAllocator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.drill.exec.memory</div> |
| <h2 title="Interface BufferAllocator" class="title">Interface BufferAllocator</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Superinterfaces:</dt> |
| <dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../../org/apache/drill/exec/memory/BaseAllocator.html" title="class in org.apache.drill.exec.memory">BaseAllocator</a>, <a href="../../../../../org/apache/drill/exec/memory/RootAllocator.html" title="class in org.apache.drill.exec.memory">RootAllocator</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">BufferAllocator</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></pre> |
| <div class="block">Wrapper class to deal with byte buffer allocation. Ensures users only use designated methods.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#assertOpen--">assertOpen</a></span>()</code> |
| <div class="block">Asserts (using java assertions) that the provided allocator is currently open.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#buffer-int-">buffer</a></span>(int size)</code> |
| <div class="block">Allocate a new or reused buffer of the provided size.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#buffer-int-org.apache.drill.exec.ops.BufferManager-">buffer</a></span>(int size, |
| <a href="../../../../../org/apache/drill/exec/ops/BufferManager.html" title="interface in org.apache.drill.exec.ops">BufferManager</a> manager)</code> |
| <div class="block">Allocate a new or reused buffer of the provided size.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#close--">close</a></span>()</code> |
| <div class="block">Close and release all buffers generated from this buffer pool.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getAllocatedMemory--">getAllocatedMemory</a></span>()</code> |
| <div class="block">Returns the amount of memory currently allocated from this allocator.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>io.netty.buffer.ByteBufAllocator</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getAsByteBufAllocator--">getAsByteBufAllocator</a></span>()</code> |
| <div class="block">Returns the allocator this allocator falls back to when it needs more memory.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getEmpty--">getEmpty</a></span>()</code> |
| <div class="block">Get a reference to the empty buffer associated with this allocator.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getLimit--">getLimit</a></span>()</code> |
| <div class="block">Return the current maximum limit this allocator imposes.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getName--">getName</a></span>()</code> |
| <div class="block">Return the name of this allocator.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#getPeakMemoryAllocation--">getPeakMemoryAllocation</a></span>()</code> |
| <div class="block">Returns the peak amount of memory allocated from this allocator.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#isOverLimit--">isOverLimit</a></span>()</code> |
| <div class="block">Return whether or not this allocator (or one if its parents) is over its limits.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html" title="interface in org.apache.drill.exec.memory">BufferAllocator</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#newChildAllocator-java.lang.String-long-long-">newChildAllocator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| long initReservation, |
| long maxAllocation)</code> |
| <div class="block">Create a new child allocator.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../org/apache/drill/exec/memory/AllocationReservation.html" title="interface in org.apache.drill.exec.memory">AllocationReservation</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#newReservation--">newReservation</a></span>()</code> |
| <div class="block">Create an allocation reservation.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#read-io.netty.buffer.DrillBuf-int-java.io.InputStream-">read</a></span>(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</code> |
| <div class="block">Read the contents of a DrillBuf from a stream.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#read-int-java.io.InputStream-">read</a></span>(int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in)</code> |
| <div class="block">Reads the specified number of bytes into a new Drillbuf.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#setLenient--">setLenient</a></span>()</code> |
| <div class="block">Request lenient enforcement of the allocation limits.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#setLimit-long-">setLimit</a></span>(long newLimit)</code> |
| <div class="block">Set the maximum amount of memory this allocator is allowed to allocate.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#toVerboseString--">toVerboseString</a></span>()</code> |
| <div class="block">Return a verbose string describing this allocator.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#write-io.netty.buffer.DrillBuf-int-java.io.OutputStream-">write</a></span>(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code> |
| <div class="block">Write the contents of a DrillBuf to a stream.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html#write-io.netty.buffer.DrillBuf-java.io.OutputStream-">write</a></span>(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code> |
| <div class="block">Write the contents of a DrillBuf to a stream.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="buffer-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buffer</h4> |
| <pre><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buffer(int size)</pre> |
| <div class="block">Allocate a new or reused buffer of the provided size. Note that the buffer may technically be larger than the |
| requested size for rounding purposes. However, the buffer's capacity will be set to the configured size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>size</code> - The size in bytes.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new DrillBuf, or null if the request can't be satisfied</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>OutOfMemoryException</code> - if buffer cannot be allocated</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="buffer-int-org.apache.drill.exec.ops.BufferManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buffer</h4> |
| <pre><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buffer(int size, |
| <a href="../../../../../org/apache/drill/exec/ops/BufferManager.html" title="interface in org.apache.drill.exec.ops">BufferManager</a> manager)</pre> |
| <div class="block">Allocate a new or reused buffer of the provided size. Note that the buffer may technically be larger than the |
| requested size for rounding purposes. However, the buffer's capacity will be set to the configured size.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>size</code> - The size in bytes.</dd> |
| <dd><code>manager</code> - A buffer manager to manage reallocation.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new DrillBuf, or null if the request can't be satisfied</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>OutOfMemoryException</code> - if buffer cannot be allocated</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAsByteBufAllocator--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAsByteBufAllocator</h4> |
| <pre>io.netty.buffer.ByteBufAllocator getAsByteBufAllocator()</pre> |
| <div class="block">Returns the allocator this allocator falls back to when it needs more memory.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the underlying allocator used by this allocator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newChildAllocator-java.lang.String-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newChildAllocator</h4> |
| <pre><a href="../../../../../org/apache/drill/exec/memory/BufferAllocator.html" title="interface in org.apache.drill.exec.memory">BufferAllocator</a> newChildAllocator(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, |
| long initReservation, |
| long maxAllocation)</pre> |
| <div class="block">Create a new child allocator.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the allocator.</dd> |
| <dd><code>initReservation</code> - the initial space reservation (obtained from this allocator)</dd> |
| <dd><code>maxAllocation</code> - maximum amount of space the new allocator can allocate</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new allocator, or null if it can't be created</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="close--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>void close()</pre> |
| <div class="block">Close and release all buffers generated from this buffer pool. |
| |
| <p>When assertions are on, complains if there are any outstanding buffers; to avoid |
| that, release all buffers before the allocator is closed.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code> in interface <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAllocatedMemory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAllocatedMemory</h4> |
| <pre>long getAllocatedMemory()</pre> |
| <div class="block">Returns the amount of memory currently allocated from this allocator.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the amount of memory currently allocated</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLimit-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLimit</h4> |
| <pre>void setLimit(long newLimit)</pre> |
| <div class="block">Set the maximum amount of memory this allocator is allowed to allocate.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>newLimit</code> - The new Limit to apply to allocations</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setLenient--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLenient</h4> |
| <pre>boolean setLenient()</pre> |
| <div class="block">Request lenient enforcement of the allocation limits. Use for |
| memory-managed operators to prevent minor math errors from killing |
| queries. This is temporary until Drill manages memory better. |
| Leniency is allowed only in production code (no assertions), |
| not in debug mode (assertions enabled).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if leniency was granted, false if the allocator will |
| enforce strict limits despite the request</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLimit--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLimit</h4> |
| <pre>long getLimit()</pre> |
| <div class="block">Return the current maximum limit this allocator imposes.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Limit in number of bytes.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getPeakMemoryAllocation--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPeakMemoryAllocation</h4> |
| <pre>long getPeakMemoryAllocation()</pre> |
| <div class="block">Returns the peak amount of memory allocated from this allocator.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the peak amount of memory allocated</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="newReservation--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newReservation</h4> |
| <pre><a href="../../../../../org/apache/drill/exec/memory/AllocationReservation.html" title="interface in org.apache.drill.exec.memory">AllocationReservation</a> newReservation()</pre> |
| <div class="block">Create an allocation reservation. A reservation is a way of building up |
| a request for a buffer whose size is not known in advance. See |
| <a href="../../../../../org/apache/drill/exec/memory/AllocationReservation.html" title="interface in org.apache.drill.exec.memory"><code>AllocationReservation</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created reservation</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEmpty--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEmpty</h4> |
| <pre><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> getEmpty()</pre> |
| <div class="block">Get a reference to the empty buffer associated with this allocator. Empty buffers are special because we don't |
| worry about them leaking or managing reference counts on them since they don't actually point to any memory.</div> |
| </li> |
| </ul> |
| <a name="getName--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getName</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getName()</pre> |
| <div class="block">Return the name of this allocator. This is a human readable name that can help debugging. Typically provides |
| coordinates about where this allocator was created</div> |
| </li> |
| </ul> |
| <a name="isOverLimit--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isOverLimit</h4> |
| <pre>boolean isOverLimit()</pre> |
| <div class="block">Return whether or not this allocator (or one if its parents) is over its limits. In the case that an allocator is |
| over its limit, all consumers of that allocator should aggressively try to addrss the overlimit situation.</div> |
| </li> |
| </ul> |
| <a name="toVerboseString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toVerboseString</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toVerboseString()</pre> |
| <div class="block">Return a verbose string describing this allocator. If in DEBUG mode, this will also include relevant stacktraces |
| and historical logs for underlying objects</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>A very verbose description of the allocator hierarchy.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="assertOpen--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>assertOpen</h4> |
| <pre>void assertOpen()</pre> |
| <div class="block">Asserts (using java assertions) that the provided allocator is currently open. If assertions are disabled, this is |
| a no-op.</div> |
| </li> |
| </ul> |
| <a name="write-io.netty.buffer.DrillBuf-java.io.OutputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre>void write(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the contents of a DrillBuf to a stream. Use this method, rather |
| than calling the DrillBuf.getBytes() method, because this method |
| avoids repeated heap allocation for the intermediate heap buffer. |
| Uses the reader and writer indexes to determine |
| the number of bytes to write. Useful only for bufs created using |
| those indexes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - the Drillbuf to write</dd> |
| <dd><code>out</code> - the output stream</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a write error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="write-io.netty.buffer.DrillBuf-int-java.io.OutputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>write</h4> |
| <pre>void write(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the contents of a DrillBuf to a stream. Use this method, rather |
| than calling the DrillBuf.getBytes() method, because this method |
| avoids repeated heap allocation for the intermediate heap buffer. |
| Writes the specified number of bytes starting from the head of the |
| given Drillbuf.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - the Drillbuf to write</dd> |
| <dd><code>length</code> - the number of bytes to read. Must be less than or |
| equal to number of bytes allocated in the buffer.</dd> |
| <dd><code>out</code> - the output stream</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a write error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="read-io.netty.buffer.DrillBuf-int-java.io.InputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>read</h4> |
| <pre>void read(<a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> buf, |
| int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Read the contents of a DrillBuf from a stream. Use this method, rather |
| than calling the DrillBuf.writeBytes() method, because this method |
| avoids repeated heap allocation for the intermediate heap buffer. |
| The buffer must have already been allocated.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - the buffer to read with space already allocated</dd> |
| <dd><code>length</code> - number of bytes to read</dd> |
| <dd><code>in</code> - input stream from which to read data</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="read-int-java.io.InputStream-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>read</h4> |
| <pre><a href="../../../../../io/netty/buffer/DrillBuf.html" title="class in io.netty.buffer">DrillBuf</a> read(int length, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> in) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Reads the specified number of bytes into a new Drillbuf.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>length</code> - number of bytes to read</dd> |
| <dd><code>in</code> - input stream from which to read data</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the buffer holding the data read from the stream</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if a read error occurs</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/BufferAllocator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/drill/exec/memory/BoundsChecking.html" title="class in org.apache.drill.exec.memory"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/drill/exec/memory/DrillByteBufAllocator.html" title="class in org.apache.drill.exec.memory"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/drill/exec/memory/BufferAllocator.html" target="_top">Frames</a></li> |
| <li><a href="BufferAllocator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 1970 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |