blob: 780b9871c12ae84f8b9f47ade9ee0847eb22f237 [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>BucketCache (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="BucketCache (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,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":9,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":10,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/BucketCache.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/BucketAllocatorException.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/BucketCache.BucketEntryGroup.html" title="class 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/BucketCache.html" target="_top">Frames</a></li>
<li><a href="BucketCache.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 BucketCache" class="title">Class BucketCache</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.BucketCache</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;, <a href="../../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a>, <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
public class <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.104">BucketCache</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/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>, <a href="../../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></pre>
<div class="block">BucketCache uses <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> to allocate/free blocks, and uses
BucketCache#ramCache and BucketCache#backingMap in order to
determine if a given element is in the cache. The bucket cache can use on-heap or
off-heap memory <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>ByteBufferIOEngine</code></a> or in a file <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>FileIOEngine</code></a> to
store/read the block data.
<p>Eviction is via a similar algorithm as used in
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/LruBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>LruBlockCache</code></a>
<p>BucketCache can be used as mainly a block cache (see
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile"><code>CombinedBlockCache</code></a>), combined with
a BlockCache to decrease CMS GC and heap fragmentation.
<p>It also can be used as a secondary cache (e.g. using a file on ssd/fusionio to store
blocks) to enlarge cache space via a victim cache.</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>private class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.BucketEntryGroup.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.BucketEntryGroup</a></span></code>
<div class="block">Used to group bucket entries into priority buckets.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMCache</a></span></code>
<div class="block">Wrapped the delegate ConcurrentMap with maintaining its block's reference count.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a></span></code>
<div class="block">Block Entry stored in the memory with key,data and so on</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.StatisticsThread.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.StatisticsThread</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.WriterThread.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.WriterThread</a></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>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#ACCEPT_FACTOR_CONFIG_NAME">ACCEPT_FACTOR_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#acceptableFactor">acceptableFactor</a></span></code>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#accessCount">accessCount</a></span></code>
<div class="block">Cache access count (sequential ID)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#algorithm">algorithm</a></span></code>
<div class="block">Use <a href="https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> class's encryption algorithms to check
persistent file integrity, default algorithm is MD5</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentHashMap</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<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/BucketCache.html#backingMap">backingMap</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#blockNumber">blockNumber</a></span></code>
<div class="block">Current number of cached elements</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/NavigableSet.html?is-external=true" title="class or interface in java.util">NavigableSet</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#blocksByHFile">blocksByHFile</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#blockSize">blockSize</a></span></code>
<div class="block">Approximate block size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#bucketAllocator">bucketAllocator</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheCapacity">cacheCapacity</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheEnabled">cacheEnabled</a></span></code>
<div class="block">Flag if the cache is enabled or not...</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCacheStats</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheStats">cacheStats</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_ACCEPT_FACTOR">DEFAULT_ACCEPT_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_CACHE_WAIT_TIME">DEFAULT_CACHE_WAIT_TIME</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_ERROR_TOLERATION_DURATION">DEFAULT_ERROR_TOLERATION_DURATION</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_EXTRA_FREE_FACTOR">DEFAULT_EXTRA_FREE_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_FILE_VERIFY_ALGORITHM">DEFAULT_FILE_VERIFY_ALGORITHM</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_FREE_ENTIRE_BLOCK_FACTOR">DEFAULT_FREE_ENTIRE_BLOCK_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_MEMORY_FACTOR">DEFAULT_MEMORY_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_MIN_FACTOR">DEFAULT_MIN_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_MULTI_FACTOR">DEFAULT_MULTI_FACTOR</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_SINGLE_FACTOR">DEFAULT_SINGLE_FACTOR</a></span></code>
<div class="block">Priority buckets</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_WRITER_QUEUE_ITEMS">DEFAULT_WRITER_QUEUE_ITEMS</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#DEFAULT_WRITER_THREADS">DEFAULT_WRITER_THREADS</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#EXTRA_FREE_FACTOR_CONFIG_NAME">EXTRA_FREE_FACTOR_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#extraFreeFactor">extraFreeFactor</a></span></code>
<div class="block">Free this floating point factor of extra blocks when evicting.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#FILE_VERIFY_ALGORITHM">FILE_VERIFY_ALGORITHM</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#freeInProgress">freeInProgress</a></span></code>
<div class="block">Volatile boolean to track if free space is in process or not</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#freeSpaceLock">freeSpaceLock</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#heapSize">heapSize</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/IOEngine.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">IOEngine</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#ioEngine">ioEngine</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#ioErrorStartTime">ioErrorStartTime</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/BucketCache.html#ioErrorsTolerationDuration">ioErrorsTolerationDuration</a></span></code>
<div class="block">Duration of IO errors tolerated before we disable cache, 1 min as default</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#LOG">LOG</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#MEMORY_FACTOR_CONFIG_NAME">MEMORY_FACTOR_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#memoryFactor">memoryFactor</a></span></code>
<div class="block">In-memory bucket size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#MIN_FACTOR_CONFIG_NAME">MIN_FACTOR_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#minFactor">minFactor</a></span></code>
<div class="block">Minimum threshold of cache (when evicting, evict until size < min)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#MULTI_FACTOR_CONFIG_NAME">MULTI_FACTOR_CONFIG_NAME</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#multiFactor">multiFactor</a></span></code>
<div class="block">Multiple access bucket size</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <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;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#offsetLock">offsetLock</a></span></code>
<div class="block">A ReentrantReadWriteLock to lock on a particular block identified by offset.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#persistencePath">persistencePath</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMCache</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#ramCache">ramCache</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#realCacheSize">realCacheSize</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#scheduleThreadPool">scheduleThreadPool</a></span></code>
<div class="block">Statistics thread schedule pool (for heavy debugging, could remove)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#SINGLE_FACTOR_CONFIG_NAME">SINGLE_FACTOR_CONFIG_NAME</a></span></code>
<div class="block">Priority buckets config</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#singleFactor">singleFactor</a></span></code>
<div class="block">Single access bucket size</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#statThreadPeriod">statThreadPeriod</a></span></code>
<div class="block">Statistics thread</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#STRONG_REF_DEFAULT">STRONG_REF_DEFAULT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#STRONG_REF_KEY">STRONG_REF_KEY</a></span></code>
<div class="block">Use strong reference for offsetLock or not</div>
</td>
</tr>
<tr 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/BucketCache.html#wait_when_cache">wait_when_cache</a></span></code>
<div class="block">Used in tests.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html?is-external=true" title="class or interface in java.util.concurrent">BlockingQueue</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#writerQueues">writerQueues</a></span></code>
<div class="block">A list of writer queues.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.WriterThread.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.WriterThread</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#writerThreads">writerThreads</a></span></code>&nbsp;</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/BucketCache.html#BucketCache-java.lang.String-long-int-int:A-int-int-java.lang.String-">BucketCache</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>&nbsp;ioEngineName,
long&nbsp;capacity,
int&nbsp;blockSize,
int[]&nbsp;bucketSizes,
int&nbsp;writerThreadNum,
int&nbsp;writerQLen,
<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>&nbsp;persistencePath)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#BucketCache-java.lang.String-long-int-int:A-int-int-java.lang.String-int-org.apache.hadoop.conf.Configuration-">BucketCache</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>&nbsp;ioEngineName,
long&nbsp;capacity,
int&nbsp;blockSize,
int[]&nbsp;bucketSizes,
int&nbsp;writerThreadNum,
int&nbsp;writerQLen,
<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>&nbsp;persistencePath,
int&nbsp;ioErrorsTolerationDuration,
org.apache.hadoop.conf.Configuration&nbsp;conf)</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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#acceptableSize--">acceptableSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" 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/BucketCache.html#blockEvicted-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry-boolean-">blockEvicted</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a>&nbsp;bucketEntry,
boolean&nbsp;decrementBlockNumber)</code>&nbsp;</td>
</tr>
<tr id="i2" 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/BucketCache.html#bucketSizesAboveThresholdCount-float-">bucketSizesAboveThresholdCount</a></span>(float&nbsp;minFactor)</code>
<div class="block">Return the count of bucketSizeinfos still need free space</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/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">cacheBlock</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</code>
<div class="block">Cache the block with the specified name and buffer.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">cacheBlock</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory)</code>
<div class="block">Cache the block with the specified name and buffer.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#cacheBlockWithWait-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-boolean-">cacheBlockWithWait</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory,
boolean&nbsp;wait)</code>
<div class="block">Cache the block to ramCache</div>
</td>
</tr>
<tr id="i6" 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/BucketCache.html#cacheBlockWithWaitInternal-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-boolean-">cacheBlockWithWaitInternal</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory,
boolean&nbsp;wait)</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#checkIOErrorIsTolerated--">checkIOErrorIsTolerated</a></span>()</code>
<div class="block">Check whether we tolerate IO error this time.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.Recycler.html" title="interface in org.apache.hadoop.hbase.io">ByteBuffAllocator.Recycler</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#createRecycler-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">createRecycler</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io">FileInputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#deleteFileOnClose-java.io.File-">deleteFileOnClose</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)</code>
<div class="block">Create an input stream that deletes the file after reading it.</div>
</td>
</tr>
<tr id="i10" 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/BucketCache.html#disableCache--">disableCache</a></span>()</code>
<div class="block">Used to shut down the cache -or- turn it off in the case of something broken.</div>
</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/BucketCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">evictBlock</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>
<div class="block">Try to evict the block from <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile"><code>BlockCache</code></a> by force.</div>
</td>
</tr>
<tr id="i12" 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/BucketCache.html#evictBlocksByHfileName-java.lang.String-">evictBlocksByHfileName</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>&nbsp;hfileName)</code>
<div class="block">Evicts all blocks for a specific HFile.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#freeEntireBuckets-int-">freeEntireBuckets</a></span>(int&nbsp;completelyFreeBucketsNeeded)</code>
<div class="block">This method will find the buckets that are minimally occupied
and are not reference counted and will free them completely
without any constraint on the access times of the elements,
and as a process will completely free at most the number of buckets
passed, sometimes it might not due to changing refCounts</div>
</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/BucketCache.html#freeSpace-java.lang.String-">freeSpace</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>&nbsp;why)</code>
<div class="block">Free the space if the used size reaches acceptableSize() or one size block
couldn't be allocated.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getAcceptableFactor--">getAcceptableFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected <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/hadoop/hbase/io/hfile/bucket/BucketCache.html#getAlgorithm--">getAlgorithm</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketAllocator</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getAllocator--">getAllocator</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><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/BucketCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">getBlock</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;key,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</code>
<div class="block">Get the buffer of the block with the specified key.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getBlockCaches--">getBlockCaches</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getBlockCount--">getBlockCount</a></span>()</code>
<div class="block">Returns the number of blocks currently cached in the block cache.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getCurrentDataSize--">getCurrentDataSize</a></span>()</code>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getCurrentSize--">getCurrentSize</a></span>()</code>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getDataBlockCount--">getDataBlockCount</a></span>()</code>
<div class="block">Returns the number of data blocks currently cached in the block cache.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getExtraFreeFactor--">getExtraFreeFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getFreeSize--">getFreeSize</a></span>()</code>
<div class="block">Returns the free size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i26" 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/hadoop/hbase/io/hfile/bucket/BucketCache.html#getIoEngine--">getIoEngine</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>private <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/IOEngine.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">IOEngine</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getIOEngineFromName-java.lang.String-long-java.lang.String-">getIOEngineFromName</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>&nbsp;ioEngineName,
long&nbsp;capacity,
<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>&nbsp;persistencePath)</code>
<div class="block">Get the IOEngine from the IO engine name</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getMaxSize--">getMaxSize</a></span>()</code>
<div class="block">Returns the Max size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getMemoryFactor--">getMemoryFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getMinFactor--">getMinFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getMultiFactor--">getMultiFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i32" 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/BucketCache.html#getPartitionSize-float-">getPartitionSize</a></span>(float&nbsp;partitionFactor)</code>&nbsp;</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>(package private) static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getRAMQueueEntries-java.util.concurrent.BlockingQueue-java.util.List-">getRAMQueueEntries</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html?is-external=true" title="class or interface in java.util.concurrent">BlockingQueue</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&nbsp;q,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&nbsp;receptacle)</code>
<div class="block">Blocks until elements available in <code>q</code> then tries to grab as many as possible before
returning.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getRealCacheSize--">getRealCacheSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getRpcRefCount-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">getRpcRefCount</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>&nbsp;</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>(package private) float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getSingleFactor--">getSingleFactor</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getStats--">getStats</a></span>()</code>
<div class="block">Get the statistics for this block cache.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#heapSize--">heapSize</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i39" 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/BucketCache.html#isCacheEnabled--">isCacheEnabled</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#iterator--">iterator</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#join--">join</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#logStats--">logStats</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#parsePB-org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BucketCacheEntry-">parsePB</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BucketCacheEntry&nbsp;proto)</code>&nbsp;</td>
</tr>
<tr id="i44" 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/BucketCache.html#persistToFile--">persistToFile</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>private boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#removeFromRamCache-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">removeFromRamCache</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</code>&nbsp;</td>
</tr>
<tr id="i46" 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/BucketCache.html#retrieveFromFile-int:A-">retrieveFromFile</a></span>(int[]&nbsp;bucketSizes)</code>&nbsp;</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>private void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#sanityCheckConfigs--">sanityCheckConfigs</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#shutdown--">shutdown</a></span>()</code>
<div class="block">Shutdown the cache.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#size--">size</a></span>()</code>
<div class="block">Returns the total size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#startWriterThreads--">startWriterThreads</a></span>()</code>
<div class="block">Called by the constructor to start the writer threads.</div>
</td>
</tr>
<tr id="i51" 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/BucketCache.html#stopWriterThreads--">stopWriterThreads</a></span>()</code>
<div class="block">Only used in test</div>
</td>
</tr>
<tr id="i52" 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/BucketCache.html#verifyCapacityAndClasses-long-java.lang.String-java.lang.String-">verifyCapacityAndClasses</a></span>(long&nbsp;capacitySize,
<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>&nbsp;ioclass,
<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>&nbsp;mapclass)</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.io.hfile.BlockCache">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.hadoop.hbase.io.hfile.<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></h3>
<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-org.apache.hadoop.hbase.io.hfile.BlockType-">getBlock</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#forEach-java.util.function.Consumer-" title="class or interface in java.lang">forEach</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#spliterator--" title="class or interface in java.lang">spliterator</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="LOG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.105">LOG</a></pre>
</li>
</ul>
<a name="SINGLE_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SINGLE_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.108">SINGLE_FACTOR_CONFIG_NAME</a></pre>
<div class="block">Priority buckets config</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.SINGLE_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MULTI_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MULTI_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.109">MULTI_FACTOR_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.MULTI_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MEMORY_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MEMORY_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.110">MEMORY_FACTOR_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.MEMORY_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="EXTRA_FREE_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXTRA_FREE_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.111">EXTRA_FREE_FACTOR_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.EXTRA_FREE_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACCEPT_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACCEPT_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.112">ACCEPT_FACTOR_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.ACCEPT_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="MIN_FACTOR_CONFIG_NAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MIN_FACTOR_CONFIG_NAME</h4>
<pre>static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.113">MIN_FACTOR_CONFIG_NAME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.MIN_FACTOR_CONFIG_NAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STRONG_REF_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STRONG_REF_KEY</h4>
<pre>private static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.116">STRONG_REF_KEY</a></pre>
<div class="block">Use strong reference for offsetLock or not</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.STRONG_REF_KEY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="STRONG_REF_DEFAULT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STRONG_REF_DEFAULT</h4>
<pre>private static final&nbsp;boolean <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.117">STRONG_REF_DEFAULT</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.STRONG_REF_DEFAULT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_SINGLE_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_SINGLE_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.120">DEFAULT_SINGLE_FACTOR</a></pre>
<div class="block">Priority buckets</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_SINGLE_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MULTI_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MULTI_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.121">DEFAULT_MULTI_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_MULTI_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MEMORY_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MEMORY_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.122">DEFAULT_MEMORY_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_MEMORY_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MIN_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MIN_FACTOR</h4>
<pre>static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.123">DEFAULT_MIN_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_MIN_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_EXTRA_FREE_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_EXTRA_FREE_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.125">DEFAULT_EXTRA_FREE_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_EXTRA_FREE_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_ACCEPT_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ACCEPT_FACTOR</h4>
<pre>private static final&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.126">DEFAULT_ACCEPT_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_ACCEPT_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_FREE_ENTIRE_BLOCK_FACTOR">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_FREE_ENTIRE_BLOCK_FACTOR</h4>
<pre>private static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.129">DEFAULT_FREE_ENTIRE_BLOCK_FACTOR</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_FREE_ENTIRE_BLOCK_FACTOR">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="statThreadPeriod">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>statThreadPeriod</h4>
<pre>private static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.132">statThreadPeriod</a></pre>
<div class="block">Statistics thread</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.statThreadPeriod">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_WRITER_THREADS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_WRITER_THREADS</h4>
<pre>static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.134">DEFAULT_WRITER_THREADS</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_WRITER_THREADS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_WRITER_QUEUE_ITEMS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_WRITER_QUEUE_ITEMS</h4>
<pre>static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.135">DEFAULT_WRITER_QUEUE_ITEMS</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_WRITER_QUEUE_ITEMS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ioEngine">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ioEngine</h4>
<pre>final transient&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/IOEngine.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">IOEngine</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.138">ioEngine</a></pre>
</li>
</ul>
<a name="ramCache">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ramCache</h4>
<pre>final transient&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMCache</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.141">ramCache</a></pre>
</li>
</ul>
<a name="backingMap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>backingMap</h4>
<pre>transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentHashMap</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>,<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/BucketCache.html#line.143">backingMap</a></pre>
</li>
</ul>
<a name="cacheEnabled">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheEnabled</h4>
<pre>private volatile&nbsp;boolean <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.150">cacheEnabled</a></pre>
<div class="block">Flag if the cache is enabled or not... We shut it off if there are IO
errors for some time, so that Bucket IO exceptions/errors don't bring down
the HBase server.</div>
</li>
</ul>
<a name="writerQueues">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writerQueues</h4>
<pre>final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html?is-external=true" title="class or interface in java.util.concurrent">BlockingQueue</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&gt; <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.159">writerQueues</a></pre>
<div class="block">A list of writer queues. We have a queue per <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.WriterThread.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket"><code>BucketCache.WriterThread</code></a> we have running.
In other words, the work adding blocks to the BucketCache is divided up amongst the
running WriterThreads. Its done by taking hash of the cache key modulo queue count.
WriterThread when it runs takes whatever has been recently added and 'drains' the entries
to the BucketCache. It then updates the ramCache and backingMap accordingly.</div>
</li>
</ul>
<a name="writerThreads">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writerThreads</h4>
<pre>final transient&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.WriterThread.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.WriterThread</a>[] <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.160">writerThreads</a></pre>
</li>
</ul>
<a name="freeInProgress">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>freeInProgress</h4>
<pre>private volatile&nbsp;boolean <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.163">freeInProgress</a></pre>
<div class="block">Volatile boolean to track if free space is in process or not</div>
</li>
</ul>
<a name="freeSpaceLock">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>freeSpaceLock</h4>
<pre>private final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.164">freeSpaceLock</a></pre>
</li>
</ul>
<a name="realCacheSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>realCacheSize</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.166">realCacheSize</a></pre>
</li>
</ul>
<a name="heapSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heapSize</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.167">heapSize</a></pre>
</li>
</ul>
<a name="blockNumber">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockNumber</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html?is-external=true" title="class or interface in java.util.concurrent.atomic">LongAdder</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.169">blockNumber</a></pre>
<div class="block">Current number of cached elements</div>
</li>
</ul>
<a name="accessCount">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>accessCount</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html?is-external=true" title="class or interface in java.util.concurrent.atomic">AtomicLong</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.172">accessCount</a></pre>
<div class="block">Cache access count (sequential ID)</div>
</li>
</ul>
<a name="DEFAULT_CACHE_WAIT_TIME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CACHE_WAIT_TIME</h4>
<pre>private static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.174">DEFAULT_CACHE_WAIT_TIME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_CACHE_WAIT_TIME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="wait_when_cache">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wait_when_cache</h4>
<pre>boolean <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.181">wait_when_cache</a></pre>
<div class="block">Used in tests. If this flag is false and the cache speed is very fast,
bucket cache will skip some blocks when caching. If the flag is true, we
will wait until blocks are flushed to IOEngine.</div>
</li>
</ul>
<a name="cacheStats">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheStats</h4>
<pre>private final&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCacheStats</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.183">cacheStats</a></pre>
</li>
</ul>
<a name="persistencePath">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>persistencePath</h4>
<pre>private final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.185">persistencePath</a></pre>
</li>
</ul>
<a name="cacheCapacity">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheCapacity</h4>
<pre>private final&nbsp;long <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.186">cacheCapacity</a></pre>
</li>
</ul>
<a name="blockSize">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockSize</h4>
<pre>private final&nbsp;long <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.188">blockSize</a></pre>
<div class="block">Approximate block size</div>
</li>
</ul>
<a name="ioErrorsTolerationDuration">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ioErrorsTolerationDuration</h4>
<pre>private final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.191">ioErrorsTolerationDuration</a></pre>
<div class="block">Duration of IO errors tolerated before we disable cache, 1 min as default</div>
</li>
</ul>
<a name="DEFAULT_ERROR_TOLERATION_DURATION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ERROR_TOLERATION_DURATION</h4>
<pre>public static final&nbsp;int <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.193">DEFAULT_ERROR_TOLERATION_DURATION</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_ERROR_TOLERATION_DURATION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ioErrorStartTime">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ioErrorStartTime</h4>
<pre>private volatile&nbsp;long <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.197">ioErrorStartTime</a></pre>
</li>
</ul>
<a name="offsetLock">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offsetLock</h4>
<pre>final transient&nbsp;<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; <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.204">offsetLock</a></pre>
<div class="block">A ReentrantReadWriteLock to lock on a particular block identified by offset.
The purpose of this is to avoid freeing the block which is being read.
<p></div>
</li>
</ul>
<a name="blocksByHFile">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blocksByHFile</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/NavigableSet.html?is-external=true" title="class or interface in java.util">NavigableSet</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&gt; <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.206">blocksByHFile</a></pre>
</li>
</ul>
<a name="scheduleThreadPool">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>scheduleThreadPool</h4>
<pre>private final transient&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ScheduledExecutorService.html?is-external=true" title="class or interface in java.util.concurrent">ScheduledExecutorService</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.215">scheduleThreadPool</a></pre>
<div class="block">Statistics thread schedule pool (for heavy debugging, could remove)</div>
</li>
</ul>
<a name="bucketAllocator">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bucketAllocator</h4>
<pre>private transient&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketAllocator</a> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.220">bucketAllocator</a></pre>
</li>
</ul>
<a name="acceptableFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acceptableFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.223">acceptableFactor</a></pre>
<div class="block">Acceptable size of cache (no evictions if size < acceptable)</div>
</li>
</ul>
<a name="minFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.226">minFactor</a></pre>
<div class="block">Minimum threshold of cache (when evicting, evict until size < min)</div>
</li>
</ul>
<a name="extraFreeFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>extraFreeFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.229">extraFreeFactor</a></pre>
<div class="block">Free this floating point factor of extra blocks when evicting. For example free the number of blocks requested * (1 + extraFreeFactor)</div>
</li>
</ul>
<a name="singleFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>singleFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.232">singleFactor</a></pre>
<div class="block">Single access bucket size</div>
</li>
</ul>
<a name="multiFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multiFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.235">multiFactor</a></pre>
<div class="block">Multiple access bucket size</div>
</li>
</ul>
<a name="memoryFactor">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>memoryFactor</h4>
<pre>private&nbsp;float <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.238">memoryFactor</a></pre>
<div class="block">In-memory bucket size</div>
</li>
</ul>
<a name="FILE_VERIFY_ALGORITHM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FILE_VERIFY_ALGORITHM</h4>
<pre>private static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.240">FILE_VERIFY_ALGORITHM</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.FILE_VERIFY_ALGORITHM">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_FILE_VERIFY_ALGORITHM">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_FILE_VERIFY_ALGORITHM</h4>
<pre>private static final&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.242">DEFAULT_FILE_VERIFY_ALGORITHM</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../constant-values.html#org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.DEFAULT_FILE_VERIFY_ALGORITHM">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="algorithm">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>algorithm</h4>
<pre>private&nbsp;<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> <a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.248">algorithm</a></pre>
<div class="block">Use <a href="https://docs.oracle.com/javase/8/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><code>MessageDigest</code></a> class's encryption algorithms to check
persistent file integrity, default algorithm is MD5</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="BucketCache-java.lang.String-long-int-int:A-int-int-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BucketCache</h4>
<pre>public&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.250">BucketCache</a>(<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>&nbsp;ioEngineName,
long&nbsp;capacity,
int&nbsp;blockSize,
int[]&nbsp;bucketSizes,
int&nbsp;writerThreadNum,
int&nbsp;writerQLen,
<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>&nbsp;persistencePath)
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="BucketCache-java.lang.String-long-int-int:A-int-int-java.lang.String-int-org.apache.hadoop.conf.Configuration-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BucketCache</h4>
<pre>public&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.256">BucketCache</a>(<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>&nbsp;ioEngineName,
long&nbsp;capacity,
int&nbsp;blockSize,
int[]&nbsp;bucketSizes,
int&nbsp;writerThreadNum,
int&nbsp;writerQLen,
<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>&nbsp;persistencePath,
int&nbsp;ioErrorsTolerationDuration,
org.apache.hadoop.conf.Configuration&nbsp;conf)
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>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="sanityCheckConfigs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sanityCheckConfigs</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.330">sanityCheckConfigs</a>()</pre>
</li>
</ul>
<a name="startWriterThreads--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startWriterThreads</h4>
<pre>protected&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.346">startWriterThreads</a>()</pre>
<div class="block">Called by the constructor to start the writer threads. Used by tests that need to override
starting the threads.</div>
</li>
</ul>
<a name="isCacheEnabled--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCacheEnabled</h4>
<pre>boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.352">isCacheEnabled</a>()</pre>
</li>
</ul>
<a name="getMaxSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.357">getMaxSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getMaxSize--">BlockCache</a></code></span></div>
<div class="block">Returns the Max size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getMaxSize--">getMaxSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>size of cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getIoEngine--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIoEngine</h4>
<pre>public&nbsp;<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>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.361">getIoEngine</a>()</pre>
</li>
</ul>
<a name="getIOEngineFromName-java.lang.String-long-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIOEngineFromName</h4>
<pre>private&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/IOEngine.html" title="interface in org.apache.hadoop.hbase.io.hfile.bucket">IOEngine</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.373">getIOEngineFromName</a>(<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>&nbsp;ioEngineName,
long&nbsp;capacity,
<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>&nbsp;persistencePath)
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">Get the IOEngine from the IO engine name</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ioEngineName</code> - </dd>
<dd><code>capacity</code> - </dd>
<dd><code>persistencePath</code> - </dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the IOEngine</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></dd>
</dl>
</li>
</ul>
<a name="cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlock</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.406">cacheBlock</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;buf)</pre>
<div class="block">Cache the block with the specified name and buffer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-">cacheBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>buf</code> - block buffer</dd>
</dl>
</li>
</ul>
<a name="cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlock</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.417">cacheBlock</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory)</pre>
<div class="block">Cache the block with the specified name and buffer.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#cacheBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-">cacheBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>cachedItem</code> - block buffer</dd>
<dd><code>inMemory</code> - if block is in-memory</dd>
</dl>
</li>
</ul>
<a name="cacheBlockWithWait-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlockWithWait</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.428">cacheBlockWithWait</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory,
boolean&nbsp;wait)</pre>
<div class="block">Cache the block to ramCache</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - block's cache key</dd>
<dd><code>cachedItem</code> - block buffer</dd>
<dd><code>inMemory</code> - if block is in-memory</dd>
<dd><code>wait</code> - if true, blocking wait when queue is full</dd>
</dl>
</li>
</ul>
<a name="cacheBlockWithWaitInternal-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.Cacheable-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheBlockWithWaitInternal</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.441">cacheBlockWithWaitInternal</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile">Cacheable</a>&nbsp;cachedItem,
boolean&nbsp;inMemory,
boolean&nbsp;wait)</pre>
</li>
</ul>
<a name="getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlock</h4>
<pre>public&nbsp;<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/BucketCache.html#line.492">getBlock</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;key,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</pre>
<div class="block">Get the buffer of the block with the specified key.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-">getBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>key</code> - block's cache key</dd>
<dd><code>caching</code> - true if the caller caches blocks on cache misses</dd>
<dd><code>repeat</code> - Whether this is a repeat lookup for the same block</dd>
<dd><code>updateCacheMetrics</code> - Whether we should update cache metrics or not</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>buffer of specified cache key, or null if not in cache</dd>
</dl>
</li>
</ul>
<a name="blockEvicted-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-org.apache.hadoop.hbase.io.hfile.bucket.BucketEntry-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>blockEvicted</h4>
<pre>void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.548">blockEvicted</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketEntry</a>&nbsp;bucketEntry,
boolean&nbsp;decrementBlockNumber)</pre>
</li>
</ul>
<a name="evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlock</h4>
<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.574">evictBlock</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
<div class="block">Try to evict the block from <a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile"><code>BlockCache</code></a> by force. We'll call this in few cases:<br>
1. Close an HFile, and clear all cached blocks. <br>
2. Call <a href="../../../../../../../org/apache/hadoop/hbase/client/Admin.html#clearBlockCache-org.apache.hadoop.hbase.TableName-"><code>Admin.clearBlockCache(TableName)</code></a> to clear all blocks for a given table.<br>
<p>
Firstly, we'll try to remove the block from RAMCache. If it doesn't exist in RAMCache, then try
to evict from backingMap. Here we only need to free the reference from bucket cache by calling
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketEntry.html#markedAsEvicted"><code>BucketEntry.markedAsEvicted</code></a>. If there're still some RPC referring this block, block can
only be de-allocated when all of them release the block.
<p>
NOTICE: we need to grab the write offset lock firstly before releasing the reference from
bucket cache. if we don't, we may read an <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> with refCnt = 0 when
<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-"><code>getBlock(BlockCacheKey, boolean, boolean, boolean)</code></a>, it's a memory leak.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">evictBlock</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - Block to evict</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true to indicate whether we've evicted successfully or not.</dd>
</dl>
</li>
</ul>
<a name="createRecycler-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRecycler</h4>
<pre>private&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/ByteBuffAllocator.Recycler.html" title="interface in org.apache.hadoop.hbase.io">ByteBuffAllocator.Recycler</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.590">createRecycler</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
</li>
</ul>
<a name="removeFromRamCache-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeFromRamCache</h4>
<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.611">removeFromRamCache</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
</li>
</ul>
<a name="logStats--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logStats</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.638">logStats</a>()</pre>
</li>
</ul>
<a name="getRealCacheSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRealCacheSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.664">getRealCacheSize</a>()</pre>
</li>
</ul>
<a name="acceptableSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>acceptableSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.668">acceptableSize</a>()</pre>
</li>
</ul>
<a name="getPartitionSize-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPartitionSize</h4>
<pre>long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.672">getPartitionSize</a>(float&nbsp;partitionFactor)</pre>
</li>
</ul>
<a name="bucketSizesAboveThresholdCount-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bucketSizesAboveThresholdCount</h4>
<pre>private&nbsp;int&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.679">bucketSizesAboveThresholdCount</a>(float&nbsp;minFactor)</pre>
<div class="block">Return the count of bucketSizeinfos still need free space</div>
</li>
</ul>
<a name="freeEntireBuckets-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>freeEntireBuckets</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.701">freeEntireBuckets</a>(int&nbsp;completelyFreeBucketsNeeded)</pre>
<div class="block">This method will find the buckets that are minimally occupied
and are not reference counted and will free them completely
without any constraint on the access times of the elements,
and as a process will completely free at most the number of buckets
passed, sometimes it might not due to changing refCounts</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>completelyFreeBucketsNeeded</code> - number of buckets to free</dd>
</dl>
</li>
</ul>
<a name="freeSpace-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>freeSpace</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.727">freeSpace</a>(<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>&nbsp;why)</pre>
<div class="block">Free the space if the used size reaches acceptableSize() or one size block
couldn't be allocated. When freeing the space, we use the LRU algorithm and
ensure there must be some blocks evicted</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>why</code> - Why we are being called</dd>
</dl>
</li>
</ul>
<a name="getRAMQueueEntries-java.util.concurrent.BlockingQueue-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRAMQueueEntries</h4>
<pre>static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1042">getRAMQueueEntries</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/BlockingQueue.html?is-external=true" title="class or interface in java.util.concurrent">BlockingQueue</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&nbsp;q,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.RAMQueueEntry.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache.RAMQueueEntry</a>&gt;&nbsp;receptacle)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<div class="block">Blocks until elements available in <code>q</code> then tries to grab as many as possible before
returning.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>receptacle</code> - Where to stash the elements taken from queue. We clear before we use it just
in case.</dd>
<dd><code>q</code> - The queue to take from.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>receptacle</code> laden with elements taken from the queue or empty if none found.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="persistToFile--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>persistToFile</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1057">persistToFile</a>()
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>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#retrieveFromFile-int:A-"><code>retrieveFromFile(int[])</code></a></dd>
</dl>
</li>
</ul>
<a name="retrieveFromFile-int:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retrieveFromFile</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1071">retrieveFromFile</a>(int[]&nbsp;bucketSizes)
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>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#persistToFile--"><code>persistToFile()</code></a></dd>
</dl>
</li>
</ul>
<a name="deleteFileOnClose-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteFileOnClose</h4>
<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html?is-external=true" title="class or interface in java.io">FileInputStream</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1113">deleteFileOnClose</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;file)
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">Create an input stream that deletes the file after reading it. Use in try-with-resources to
avoid this pattern where an exception thrown from a finally block may mask earlier exceptions:
<pre>
File f = ...
try (FileInputStream fis = new FileInputStream(f)) {
// use the input stream
} finally {
if (!f.delete()) throw new IOException("failed to delete");
}
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>file</code> - the file to read and delete</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a FileInputStream for the given file</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 there is a problem creating the stream</dd>
</dl>
</li>
</ul>
<a name="verifyCapacityAndClasses-long-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>verifyCapacityAndClasses</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1138">verifyCapacityAndClasses</a>(long&nbsp;capacitySize,
<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>&nbsp;ioclass,
<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>&nbsp;mapclass)
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="parsePB-org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BucketCacheEntry-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parsePB</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1155">parsePB</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BucketCacheEntry&nbsp;proto)
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="checkIOErrorIsTolerated--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkIOErrorIsTolerated</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1172">checkIOErrorIsTolerated</a>()</pre>
<div class="block">Check whether we tolerate IO error this time. If the duration of IOEngine
throwing errors exceeds ioErrorsDurationTimeTolerated, we will disable the
cache</div>
</li>
</ul>
<a name="disableCache--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disableCache</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1190">disableCache</a>()</pre>
<div class="block">Used to shut down the cache -or- turn it off in the case of something broken.</div>
</li>
</ul>
<a name="join--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>join</h4>
<pre>private&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1203">join</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="shutdown--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1209">shutdown</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#shutdown--">BlockCache</a></code></span></div>
<div class="block">Shutdown the cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#shutdown--">shutdown</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
</dl>
</li>
</ul>
<a name="getStats--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStats</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CacheStats.html" title="class in org.apache.hadoop.hbase.io.hfile">CacheStats</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1226">getStats</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getStats--">BlockCache</a></code></span></div>
<div class="block">Get the statistics for this block cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getStats--">getStats</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Stats</dd>
</dl>
</li>
</ul>
<a name="getAllocator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllocator</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketAllocator</a>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1230">getAllocator</a>()</pre>
</li>
</ul>
<a name="heapSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>heapSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1235">heapSize</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/HeapSize.html#heapSize--">heapSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Approximate 'exclusive deep size' of implementing object. Includes
count of payload and hosting object sizings.</dd>
</dl>
</li>
</ul>
<a name="size--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1240">size</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#size--">BlockCache</a></code></span></div>
<div class="block">Returns the total size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#size--">size</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>size of cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getCurrentDataSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDataSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1245">getCurrentDataSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentDataSize--">BlockCache</a></code></span></div>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentDataSize--">getCurrentDataSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getFreeSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFreeSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1250">getFreeSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getFreeSize--">BlockCache</a></code></span></div>
<div class="block">Returns the free size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getFreeSize--">getFreeSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>free space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getBlockCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlockCount</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1255">getBlockCount</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCount--">BlockCache</a></code></span></div>
<div class="block">Returns the number of blocks currently cached in the block cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCount--">getBlockCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of blocks in the cache</dd>
</dl>
</li>
</ul>
<a name="getDataBlockCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataBlockCount</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1260">getDataBlockCount</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getDataBlockCount--">BlockCache</a></code></span></div>
<div class="block">Returns the number of data blocks currently cached in the block cache.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getDataBlockCount--">getDataBlockCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of blocks in the cache</dd>
</dl>
</li>
</ul>
<a name="getCurrentSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentSize</h4>
<pre>public&nbsp;long&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1265">getCurrentSize</a>()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentSize--">BlockCache</a></code></span></div>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentSize--">getCurrentSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getAlgorithm--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlgorithm</h4>
<pre>protected&nbsp;<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>&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1269">getAlgorithm</a>()</pre>
</li>
</ul>
<a name="evictBlocksByHfileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlocksByHfileName</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1281">evictBlocksByHfileName</a>(<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>&nbsp;hfileName)</pre>
<div class="block">Evicts all blocks for a specific HFile.
<p>
This is used for evict-on-close to remove all blocks of a specific HFile.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#evictBlocksByHfileName-java.lang.String-">evictBlocksByHfileName</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of blocks evicted</dd>
</dl>
</li>
</ul>
<a name="stopWriterThreads--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopWriterThreads</h4>
<pre>void&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1425">stopWriterThreads</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre>
<div class="block">Only used in test</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd>
</dl>
</li>
</ul>
<a name="iterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1434">iterator</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true#iterator--" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/CachedBlock.html" title="interface in org.apache.hadoop.hbase.io.hfile">CachedBlock</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#iterator--">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Iterator over the blocks in the cache.</dd>
</dl>
</li>
</ul>
<a name="getBlockCaches--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlockCaches</h4>
<pre>public&nbsp;<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a>[]&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1525">getBlockCaches</a>()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getBlockCaches--">getBlockCaches</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">BlockCache</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The list of sub blockcaches that make up this one; returns null if no sub caches.</dd>
</dl>
</li>
</ul>
<a name="getRpcRefCount-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRpcRefCount</h4>
<pre>public&nbsp;int&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1529">getRpcRefCount</a>(<a href="../../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey)</pre>
</li>
</ul>
<a name="getAcceptableFactor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAcceptableFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1537">getAcceptableFactor</a>()</pre>
</li>
</ul>
<a name="getMinFactor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1541">getMinFactor</a>()</pre>
</li>
</ul>
<a name="getExtraFreeFactor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExtraFreeFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1545">getExtraFreeFactor</a>()</pre>
</li>
</ul>
<a name="getSingleFactor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSingleFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1549">getSingleFactor</a>()</pre>
</li>
</ul>
<a name="getMultiFactor--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMultiFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1553">getMultiFactor</a>()</pre>
</li>
</ul>
<a name="getMemoryFactor--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getMemoryFactor</h4>
<pre>float&nbsp;<a href="../../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html#line.1557">getMemoryFactor</a>()</pre>
</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/BucketCache.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/BucketAllocatorException.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/BucketCache.BucketEntryGroup.html" title="class 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/BucketCache.html" target="_top">Frames</a></li>
<li><a href="BucketCache.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>