blob: 0d1c9f98c8682886b9b7065377f7d838e229bd09 [file] [log] [blame]
<!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>BufferLedger (Apache Arrow Java Root POM 17.0.0-SNAPSHOT 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="BufferLedger (Apache Arrow Java Root POM 17.0.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/BufferLedger.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/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/arrow/memory/BufferLedger.TransferResult.html" title="class in org.apache.arrow.memory"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/arrow/memory/BufferLedger.html" target="_top">Frames</a></li>
<li><a href="BufferLedger.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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.arrow.memory</div>
<h2 title="Class BufferLedger" class="title">Class BufferLedger</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.arrow.memory.BufferLedger</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a>, <a href="../../../../org/apache/arrow/memory/ValueWithKeyIncluded.html" title="interface in org.apache.arrow.memory">ValueWithKeyIncluded</a>&lt;<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">BufferLedger</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/arrow/memory/ValueWithKeyIncluded.html" title="interface in org.apache.arrow.memory">ValueWithKeyIncluded</a>&lt;<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&gt;, <a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></pre>
<div class="block">The reference manager that binds an <a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory"><code>AllocationManager</code></a> to
<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory"><code>BufferAllocator</code></a> and a set of <a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory"><code>ArrowBuf</code></a>. The set of
ArrowBufs managed by this reference manager share a common
fate (same reference count).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.TransferResult.html" title="class in org.apache.arrow.memory">BufferLedger.TransferResult</a></span></code>
<div class="block">The outcome of a Transfer.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.arrow.memory.ReferenceManager">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.apache.arrow.memory.<a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></h3>
<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#NO_OP">NO_OP</a>, <a href="../../../../org/apache/arrow/memory/ReferenceManager.html#NO_OP_ERROR_MESSAGE">NO_OP_ERROR_MESSAGE</a></code></li>
</ul>
</li>
</ul>
<!-- ========== 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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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><a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#deriveBuffer-org.apache.arrow.memory.ArrowBuf-long-long-">deriveBuffer</a></span>(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;sourceBuffer,
long&nbsp;index,
long&nbsp;length)</code>
<div class="block">Derive a new ArrowBuf from a given source ArrowBuf.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getAccountedSize--">getAccountedSize</a></span>()</code>
<div class="block">How much memory is accounted for by this ledger.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory">AllocationManager</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getAllocationManager--">getAllocationManager</a></span>()</code>
<div class="block">Get the <a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory"><code>AllocationManager</code></a> used by this BufferLedger.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getAllocator--">getAllocator</a></span>()</code>
<div class="block">Get the buffer allocator associated with this reference manager.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getKey--">getKey</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getRefCount--">getRefCount</a></span>()</code>
<div class="block">Get this ledger's reference count.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#getSize--">getSize</a></span>()</code>
<div class="block">Total size (in bytes) of memory underlying this reference manager.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#release--">release</a></span>()</code>
<div class="block">Decrement the ledger's reference count by 1 for the associated underlying
memory chunk.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#release-int-">release</a></span>(int&nbsp;decrement)</code>
<div class="block">Decrement the ledger's reference count for the associated underlying
memory chunk.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#retain--">retain</a></span>()</code>
<div class="block">Increment the ledger's reference count for associated
underlying memory chunk by 1.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#retain-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">retain</a></span>(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;srcBuffer,
<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;target)</code>
<div class="block">Create a new ArrowBuf that is associated with an alternative allocator for the purposes of
memory ownership and accounting.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#retain-int-">retain</a></span>(int&nbsp;increment)</code>
<div class="block">Increment the ledger's reference count for associated
underlying memory chunk by the given amount.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/arrow/memory/BufferLedger.TransferResult.html" title="class in org.apache.arrow.memory">BufferLedger.TransferResult</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/arrow/memory/BufferLedger.html#transferOwnership-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">transferOwnership</a></span>(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;srcBuffer,
<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;target)</code>
<div class="block">Transfer the memory accounting ownership of this ArrowBuf to another allocator.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</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="getKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKey</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;getKey()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ValueWithKeyIncluded.html#getKey--">getKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ValueWithKeyIncluded.html" title="interface in org.apache.arrow.memory">ValueWithKeyIncluded</a>&lt;<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="getAllocator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllocator</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;getAllocator()</pre>
<div class="block">Get the buffer allocator associated with this reference manager.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#getAllocator--">getAllocator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>buffer allocator</dd>
</dl>
</li>
</ul>
<a name="getRefCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRefCount</h4>
<pre>public&nbsp;int&nbsp;getRefCount()</pre>
<div class="block">Get this ledger's reference count.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#getRefCount--">getRefCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>reference count</dd>
</dl>
</li>
</ul>
<a name="release--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public&nbsp;boolean&nbsp;release()</pre>
<div class="block">Decrement the ledger's reference count by 1 for the associated underlying
memory chunk. If the reference count drops to 0, it implies that
no ArrowBufs managed by this reference manager need access to the memory
chunk. In that case, the ledger should inform the allocation manager
about releasing its ownership for the chunk. Whether or not the memory
chunk will be released is something that <a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory"><code>AllocationManager</code></a> will
decide since tracks the usage of memory chunk across multiple reference
managers and allocators.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#release--">release</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the new ref count has dropped to 0, false otherwise</dd>
</dl>
</li>
</ul>
<a name="release-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public&nbsp;boolean&nbsp;release(int&nbsp;decrement)</pre>
<div class="block">Decrement the ledger's reference count for the associated underlying
memory chunk. If the reference count drops to 0, it implies that
no ArrowBufs managed by this reference manager need access to the memory
chunk. In that case, the ledger should inform the allocation manager
about releasing its ownership for the chunk. Whether or not the memory
chunk will be released is something that <a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory"><code>AllocationManager</code></a> will
decide since tracks the usage of memory chunk across multiple reference
managers and allocators.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#release-int-">release</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>decrement</code> - amount to decrease the reference count by</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the new ref count has dropped to 0, false otherwise</dd>
</dl>
</li>
</ul>
<a name="retain--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>public&nbsp;void&nbsp;retain()</pre>
<div class="block">Increment the ledger's reference count for associated
underlying memory chunk by 1.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#retain--">retain</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
</dl>
</li>
</ul>
<a name="retain-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>public&nbsp;void&nbsp;retain(int&nbsp;increment)</pre>
<div class="block">Increment the ledger's reference count for associated
underlying memory chunk by the given amount.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#retain-int-">retain</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>increment</code> - amount to increase the reference count by</dd>
</dl>
</li>
</ul>
<a name="deriveBuffer-org.apache.arrow.memory.ArrowBuf-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deriveBuffer</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;deriveBuffer(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;sourceBuffer,
long&nbsp;index,
long&nbsp;length)</pre>
<div class="block">Derive a new ArrowBuf from a given source ArrowBuf. The new derived
ArrowBuf will share the same reference count as rest of the ArrowBufs
associated with this ledger. This operation is typically used for
slicing -- creating new ArrowBufs from a compound ArrowBuf starting at
a particular index in the underlying memory and having access to a
particular length (in bytes) of data in memory chunk.
<p>
This method is also used as a helper for transferring ownership and retain to target
allocator.
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#deriveBuffer-org.apache.arrow.memory.ArrowBuf-long-long-">deriveBuffer</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sourceBuffer</code> - source ArrowBuf</dd>
<dd><code>index</code> - index (relative to source ArrowBuf) new ArrowBuf should be
derived from</dd>
<dd><code>length</code> - length (bytes) of data in underlying memory that derived buffer will
have access to in underlying memory</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>derived buffer</dd>
</dl>
</li>
</ul>
<a name="retain-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;retain(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;srcBuffer,
<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;target)</pre>
<div class="block">Create a new ArrowBuf that is associated with an alternative allocator for the purposes of
memory ownership and accounting. This has no impact on the reference counting for the current
ArrowBuf except in the situation where the passed in Allocator is the same as the current buffer.
<p>
This operation has no impact on the reference count of this ArrowBuf. The newly created
ArrowBuf with either have a reference count of 1 (in the case that this is the first time this
memory is being associated with the target allocator or in other words allocation manager currently
doesn't hold a mapping for the target allocator) or the current value of the reference count for
the target allocator-reference manager combination + 1 in the case that the provided allocator
already had an association to this underlying memory.
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#retain-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">retain</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>srcBuffer</code> - source ArrowBuf</dd>
<dd><code>target</code> - The target allocator to create an association with.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new ArrowBuf which shares the same underlying memory as the provided ArrowBuf.</dd>
</dl>
</li>
</ul>
<a name="transferOwnership-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transferOwnership</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/BufferLedger.TransferResult.html" title="class in org.apache.arrow.memory">BufferLedger.TransferResult</a>&nbsp;transferOwnership(<a href="../../../../org/apache/arrow/memory/ArrowBuf.html" title="class in org.apache.arrow.memory">ArrowBuf</a>&nbsp;srcBuffer,
<a href="../../../../org/apache/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory">BufferAllocator</a>&nbsp;target)</pre>
<div class="block">Transfer the memory accounting ownership of this ArrowBuf to another allocator.
This will generate a new ArrowBuf that carries an association with the underlying memory
of this ArrowBuf. If this ArrowBuf is connected to the owning BufferLedger of this memory,
that memory ownership/accounting will be transferred to the target allocator. If this
ArrowBuf does not currently own the memory underlying it (and is only associated with it),
this does not transfer any ownership to the newly created ArrowBuf.
<p>
This operation has no impact on the reference count of this ArrowBuf. The newly created
ArrowBuf with either have a reference count of 1 (in the case that this is the first time
this memory is being associated with the new allocator) or the current value of the reference
count for the other AllocationManager/BufferLedger combination + 1 in the case that the provided
allocator already had an association to this underlying memory.
</p>
<p>
Transfers will always succeed, even if that puts the other allocator into an overlimit
situation. This is possible due to the fact that the original owning allocator may have
allocated this memory out of a local reservation whereas the target allocator may need to
allocate new memory from a parent or RootAllocator. This operation is done n a mostly-lockless
but consistent manner. As such, the overlimit==true situation could occur slightly prematurely
to an actual overlimit==true condition. This is simply conservative behavior which means we may
return overlimit slightly sooner than is necessary.
</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#transferOwnership-org.apache.arrow.memory.ArrowBuf-org.apache.arrow.memory.BufferAllocator-">transferOwnership</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>target</code> - The allocator to transfer ownership to.</dd>
<dd><code>srcBuffer</code> - source ArrowBuf</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A new transfer result with the impact of the transfer (whether it was overlimit) as
well as the newly created ArrowBuf.</dd>
</dl>
</li>
</ul>
<a name="getSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSize</h4>
<pre>public&nbsp;long&nbsp;getSize()</pre>
<div class="block">Total size (in bytes) of memory underlying this reference manager.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#getSize--">getSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Size (in bytes) of the memory chunk</dd>
</dl>
</li>
</ul>
<a name="getAccountedSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAccountedSize</h4>
<pre>public&nbsp;long&nbsp;getAccountedSize()</pre>
<div class="block">How much memory is accounted for by this ledger. This is either getSize()
if this is the owning ledger for the memory or zero in the case that this
is not the owning ledger associated with this memory.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html#getAccountedSize--">getAccountedSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/arrow/memory/ReferenceManager.html" title="interface in org.apache.arrow.memory">ReferenceManager</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Amount of accounted(owned) memory associated with this ledger.</dd>
</dl>
</li>
</ul>
<a name="getAllocationManager--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAllocationManager</h4>
<pre>public&nbsp;<a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory">AllocationManager</a>&nbsp;getAllocationManager()</pre>
<div class="block">Get the <a href="../../../../org/apache/arrow/memory/AllocationManager.html" title="class in org.apache.arrow.memory"><code>AllocationManager</code></a> used by this BufferLedger.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The AllocationManager used by this BufferLedger.</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/BufferLedger.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/arrow/memory/BufferAllocator.html" title="interface in org.apache.arrow.memory"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/arrow/memory/BufferLedger.TransferResult.html" title="class in org.apache.arrow.memory"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/arrow/memory/BufferLedger.html" target="_top">Frames</a></li>
<li><a href="BufferLedger.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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 &#169; 2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>