blob: 4303b56bd319424f3b0d7694b119ef339f9ff654 [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>BucketEntry (Apache HBase 3.0.0-alpha-2-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="BucketEntry (Apache HBase 3.0.0-alpha-2-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,"i13":10,"i14":10,"i15":10,"i16":10,"i17":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/BucketEntry.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/hadoop/hbase/io/hfile/bucket/BucketCacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" target="_top">Frames</a></li>
<li><a href="BucketEntry.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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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.hadoop.hbase.io.hfile.bucket</div>
<h2 title="Class BucketEntry" class="title">Class BucketEntry</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.hadoop.hbase.io.hfile.bucket.BucketEntry</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a>, org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
class <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.48">BucketEntry</a>
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/hadoop/hbase/nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></pre>
<div class="block">Item in cache. We expect this to be where most memory goes. Java uses 8 bytes just for object
headers; after this, we want to use as little as possible - so we only use 8 bytes, but in order
to do so we end up messing around with all this Java casting stuff. Offset stored as 5 bytes that
make up the long. Doubt we'll see devices this big for ages. Offsets are divided by 256. So 5
bytes gives us 256TB or so.</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>(package private) static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry.BucketEntryHandler</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="type parameter in BucketEntry.BucketEntryHandler">T</a>&gt;</span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#accessCounter">accessCounter</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#allocator">allocator</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#cachedTime">cachedTime</a></span></code>
<div class="block">Time this block was cached.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#COMPARATOR">COMPARATOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#deserializerIndex">deserializerIndex</a></span></code>
<div class="block">The index of the deserializer that can deserialize this BucketEntry content.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#length">length</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicBoolean.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicBoolean</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#markedAsEvicted">markedAsEvicted</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private byte</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#offset1">offset1</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#offsetBase">offsetBase</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockPriority.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockPriority</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#priority">priority</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/nio/RefCnt.html" title="class in org.apache.hadoop.hbase.nio">RefCnt</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#refCnt">refCnt</a></span></code>
<div class="block">The RefCnt means how many paths are referring the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketEntry</code></a>, each RPC reading path is
considering as one path, the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#backingMap"><code>BucketCache.backingMap</code></a> reference is also considered a
path.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#BucketEntry-long-int-long-boolean-">BucketEntry</a></span>(long&nbsp;offset,
int&nbsp;length,
long&nbsp;accessCounter,
boolean&nbsp;inMemory)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#BucketEntry-long-int-long-boolean-org.apache.hadoop.hbase.nio.RefCnt-org.apache.hadoop.hbase.io.ByteBuffAllocator-">BucketEntry</a></span>(long&nbsp;offset,
int&nbsp;length,
long&nbsp;accessCounter,
boolean&nbsp;inMemory,
<a href="../../../../../../../org/apache/hadoop/hbase/nio/RefCnt.html" title="class in org.apache.hadoop.hbase.nio">RefCnt</a>&nbsp;refCnt,
<a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</code>&nbsp;</td>
</tr>
</table>
</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>(package private) void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#access-long-">access</a></span>(long&nbsp;accessCounter)</code>
<div class="block">Block has been accessed.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#deserializerReference--">deserializerReference</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#getAccessCounter--">getAccessCounter</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#getCachedTime--">getCachedTime</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#getLength--">getLength</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockPriority.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockPriority</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#getPriority--">getPriority</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>(package private) boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#isRpcRef--">isRpcRef</a></span>()</code>
<div class="block">Check whether have some RPC patch referring this block.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>(package private) boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#markAsEvicted--">markAsEvicted</a></span>()</code>
<div class="block">The <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketCache</code></a> will try to release its reference to this BucketEntry many times.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>(package private) boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#markStaleAsEvicted--">markStaleAsEvicted</a></span>()</code>
<div class="block">Mark as evicted only when NO RPC references.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>(package private) long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#offset--">offset</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#refCnt--">refCnt</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#release--">release</a></span>()</code>
<div class="block">We've three cases to release refCnt now: <br>
1.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#retain--">retain</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>(package private) void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#setDeserializerReference-org.apache.hadoop.hbase.io.hfile.CacheableDeserializer-">setDeserializerReference</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;&nbsp;deserializer)</code>&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#setOffset-long-">setOffset</a></span>(long&nbsp;value)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>(package private) &lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#withWriteLock-org.apache.hadoop.hbase.util.IdReadWriteLock-org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry.BucketEntryHandler-">withWriteLock</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/util/IdReadWriteLock.html" title="class in org.apache.hadoop.hbase.util">IdReadWriteLock</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;offsetLock,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry.BucketEntryHandler</a>&lt;T&gt;&nbsp;handler)</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#wrapAsCacheable-org.apache.hadoop.hbase.nio.ByteBuff-">wrapAsCacheable</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#wrapAsCacheable-java.nio.ByteBuffer:A-">wrapAsCacheable</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>[]&nbsp;buffers)</code>&nbsp;</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>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.hadoop.hbase.nio.HBaseReferenceCounted">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.hadoop.hbase.nio.<a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html" title="interface in org.apache.hadoop.hbase.nio">HBaseReferenceCounted</a></h3>
<code><a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html#release-int-">release</a>, <a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html#retain-int-">retain</a>, <a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html#touch--">touch</a>, <a href="../../../../../../../org/apache/hadoop/hbase/nio/HBaseReferenceCounted.html#touch-java.lang.Object-">touch</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="COMPARATOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>COMPARATOR</h4>
<pre>static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a>&gt; <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.50">COMPARATOR</a></pre>
</li>
</ul>
<a name="offsetBase">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offsetBase</h4>
<pre>private&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.53">offsetBase</a></pre>
</li>
</ul>
<a name="length">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>private&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.54">length</a></pre>
</li>
</ul>
<a name="offset1">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offset1</h4>
<pre>private&nbsp;byte <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.55">offset1</a></pre>
</li>
</ul>
<a name="deserializerIndex">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deserializerIndex</h4>
<pre>byte <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.61">deserializerIndex</a></pre>
<div class="block">The index of the deserializer that can deserialize this BucketEntry content. See
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheableDeserializerIdManager.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>CacheableDeserializerIdManager</code></a> for hosting of index to serializers.</div>
</li>
</ul>
<a name="accessCounter">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>accessCounter</h4>
<pre>private volatile&nbsp;long <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.63">accessCounter</a></pre>
</li>
</ul>
<a name="priority">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>priority</h4>
<pre>private&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockPriority.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockPriority</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.64">priority</a></pre>
</li>
</ul>
<a name="refCnt">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refCnt</h4>
<pre>private final&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/nio/RefCnt.html" title="class in org.apache.hadoop.hbase.nio">RefCnt</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.81">refCnt</a></pre>
<div class="block">The RefCnt means how many paths are referring the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketEntry</code></a>, each RPC reading path is
considering as one path, the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#backingMap"><code>BucketCache.backingMap</code></a> reference is also considered a
path. NOTICE that if two read RPC path hit the same <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketEntry</code></a>, then the HFileBlocks
the two RPC referred will share the same refCnt instance with the BucketEntry. so the refCnt
will increase or decrease as the following: <br>
1. when writerThread flush the block into IOEngine and add the bucketEntry into backingMap, the
refCnt ++; <br>
2. If BucketCache evict the block and move the bucketEntry out of backingMap, the refCnt--; it
usually happen when HFile is closing or someone call the clearBucketCache by force. <br>
3. The read RPC path start to refer the block which is backend by the memory area in
bucketEntry, then refCnt ++ ; <br>
4. The read RPC patch shipped the response, and release the block. then refCnt--; <br>
Once the refCnt decrease to zero, then the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketAllocator</code></a> will free the block area.</div>
</li>
</ul>
<a name="markedAsEvicted">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markedAsEvicted</h4>
<pre>final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicBoolean.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicBoolean</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.82">markedAsEvicted</a></pre>
</li>
</ul>
<a name="allocator">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocator</h4>
<pre>final&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.83">allocator</a></pre>
</li>
</ul>
<a name="cachedTime">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>cachedTime</h4>
<pre>private final&nbsp;long <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.88">cachedTime</a></pre>
<div class="block">Time this block was cached. Presumes we are created just before we are added to the cache.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BucketEntry-long-int-long-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BucketEntry</h4>
<pre><a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.90">BucketEntry</a>(long&nbsp;offset,
int&nbsp;length,
long&nbsp;accessCounter,
boolean&nbsp;inMemory)</pre>
</li>
</ul>
<a name="BucketEntry-long-int-long-boolean-org.apache.hadoop.hbase.nio.RefCnt-org.apache.hadoop.hbase.io.ByteBuffAllocator-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BucketEntry</h4>
<pre><a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.94">BucketEntry</a>(long&nbsp;offset,
int&nbsp;length,
long&nbsp;accessCounter,
boolean&nbsp;inMemory,
<a href="../../../../../../../org/apache/hadoop/hbase/nio/RefCnt.html" title="class in org.apache.hadoop.hbase.nio">RefCnt</a>&nbsp;refCnt,
<a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.html" title="class in org.apache.hadoop.hbase.io">ByteBuffAllocator</a>&nbsp;allocator)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="offset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offset</h4>
<pre>long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.105">offset</a>()</pre>
</li>
</ul>
<a name="setOffset-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOffset</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.114">setOffset</a>(long&nbsp;value)</pre>
</li>
</ul>
<a name="getLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLength</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.121">getLength</a>()</pre>
</li>
</ul>
<a name="deserializerReference--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deserializerReference</h4>
<pre><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.125">deserializerReference</a>()</pre>
</li>
</ul>
<a name="setDeserializerReference-org.apache.hadoop.hbase.io.hfile.CacheableDeserializer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDeserializerReference</h4>
<pre>void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.129">setDeserializerReference</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheableDeserializer.html" title="interface in org.apache.hadoop.hbase.io.hfile">CacheableDeserializer</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&gt;&nbsp;deserializer)</pre>
</li>
</ul>
<a name="getAccessCounter--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAccessCounter</h4>
<pre>long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.133">getAccessCounter</a>()</pre>
</li>
</ul>
<a name="access-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>access</h4>
<pre>void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.140">access</a>(long&nbsp;accessCounter)</pre>
<div class="block">Block has been accessed. Update its local access counter.</div>
</li>
</ul>
<a name="getPriority--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPriority</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockPriority.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockPriority</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.147">getPriority</a>()</pre>
</li>
</ul>
<a name="getCachedTime--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachedTime</h4>
<pre>long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.151">getCachedTime</a>()</pre>
</li>
</ul>
<a name="markAsEvicted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markAsEvicted</h4>
<pre>boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.161">markAsEvicted</a>()</pre>
<div class="block">The <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketCache</code></a> will try to release its reference to this BucketEntry many times. we
must make sure the idempotent, otherwise it'll decrease the RPC's reference count in advance,
then for RPC memory leak happen.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if we deallocate this entry successfully.</dd>
</dl>
</li>
</ul>
<a name="markStaleAsEvicted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>markStaleAsEvicted</h4>
<pre>boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.173">markStaleAsEvicted</a>()</pre>
<div class="block">Mark as evicted only when NO RPC references. Mainly used for eviction when cache size exceed
the max acceptable size.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if we deallocate this entry successfully.</dd>
</dl>
</li>
</ul>
<a name="isRpcRef--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRpcRef</h4>
<pre>boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.191">isRpcRef</a>()</pre>
<div class="block">Check whether have some RPC patch referring this block. There're two case: <br>
1. If current refCnt is greater than 1, there must be at least one referring RPC path; <br>
2. If current refCnt is equal to 1 and the markedAtEvicted is true, the it means backingMap has
released its reference, the remaining reference can only be from RPC path. <br>
We use this check to decide whether we can free the block area: when cached size exceed the
acceptable size, our eviction policy will choose those stale blocks without any RPC reference
and the RPC referred block will be excluded.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true to indicate there're some RPC referring the block.</dd>
</dl>
</li>
</ul>
<a name="wrapAsCacheable-java.nio.ByteBuffer:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrapAsCacheable</h4>
<pre><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.196">wrapAsCacheable</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>[]&nbsp;buffers)
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>
<dl>
<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></dd>
</dl>
</li>
</ul>
<a name="wrapAsCacheable-org.apache.hadoop.hbase.nio.ByteBuff-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrapAsCacheable</h4>
<pre><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.200">wrapAsCacheable</a>(<a href="../../../../../../../org/apache/hadoop/hbase/nio/ByteBuff.html" title="class in org.apache.hadoop.hbase.nio">ByteBuff</a>&nbsp;buf)
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>
<dl>
<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></dd>
</dl>
</li>
</ul>
<a name="withWriteLock-org.apache.hadoop.hbase.util.IdReadWriteLock-org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry.BucketEntryHandler-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withWriteLock</h4>
<pre>&lt;T&gt;&nbsp;T&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.208">withWriteLock</a>(<a href="../../../../../../../org/apache/hadoop/hbase/util/IdReadWriteLock.html" title="class in org.apache.hadoop.hbase.util">IdReadWriteLock</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;offsetLock,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry.BucketEntryHandler</a>&lt;T&gt;&nbsp;handler)</pre>
</li>
</ul>
<a name="refCnt--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refCnt</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.219">refCnt</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>refCnt</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</li>
</ul>
<a name="retain--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.224">retain</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>retain</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
</dl>
</li>
</ul>
<a name="release--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>release</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#line.242">release</a>()</pre>
<div class="block">We've three cases to release refCnt now: <br>
1. BucketCache#evictBlock, it will release the backingMap's reference by force because we're
closing file or clear the bucket cache or some corruption happen. when all rpc references gone,
then free the area in bucketAllocator. <br>
2. BucketCache#returnBlock . when rpc shipped, we'll release the block, only when backingMap
also release its refCnt (case.1 will do this) and no other rpc reference, then it will free the
area in bucketAllocator. <br>
3.evict those block without any rpc reference if cache size exceeded. we'll only free those
blocks with zero rpc reference count, as the <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#markStaleAsEvicted--"><code>markStaleAsEvicted()</code></a> do.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>release</code>&nbsp;in interface&nbsp;<code>org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true to indicate we've decreased to zero and do the de-allocation.</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/BucketEntry.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/hadoop/hbase/io/hfile/bucket/BucketCacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.BucketEntryHandler.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" target="_top">Frames</a></li>
<li><a href="BucketEntry.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><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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; 2007&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>