blob: 132dfc2ef4c8696f74bbe0799723842281ac46aa [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>BlockCache (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="BlockCache (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":18,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default 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/BlockCache.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/AgeSnapshot.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheFactory.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/BlockCache.html" target="_top">Frames</a></li>
<li><a href="BlockCache.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.hadoop.hbase.io.hfile</div>
<h2 title="Interface BlockCache" class="title">Interface BlockCache</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/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;</dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/FirstLevelBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">FirstLevelBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/ResizableBlockCache.html" title="interface in org.apache.hadoop.hbase.io.hfile">ResizableBlockCache</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.html" title="class in org.apache.hadoop.hbase.io.hfile.bucket">BucketCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">CombinedBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/InclusiveCombinedBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">InclusiveCombinedBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruAdaptiveBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">LruAdaptiveBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/LruBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">LruBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/MemcachedBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">MemcachedBlockCache</a>, <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/TinyLfuBlockCache.html" title="class in org.apache.hadoop.hbase.io.hfile">TinyLfuBlockCache</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
public interface <a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.30">BlockCache</a>
extends <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;</pre>
<div class="block">Block cache interface. Anything that implements the <a href="../../../../../../org/apache/hadoop/hbase/io/hfile/Cacheable.html" title="interface in org.apache.hadoop.hbase.io.hfile"><code>Cacheable</code></a>
interface can be put in the cache.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><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></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">Add block to cache (defaults to not in-memory).</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><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></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,
boolean&nbsp;inMemory)</code>
<div class="block">Add block to cache.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.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">Evict block from cache.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.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 the given HFile.</div>
</td>
</tr>
<tr id="i4" 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/BlockCache.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;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</code>
<div class="block">Fetch block from cache.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>default <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/BlockCache.html#getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-org.apache.hadoop.hbase.io.hfile.BlockType-">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;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;blockType)</code>
<div class="block">Fetch block from cache.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<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/BlockCache.html#getBlockCaches--">getBlockCaches</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.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="i8" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentDataSize--">getCurrentDataSize</a></span>()</code>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getCurrentSize--">getCurrentSize</a></span>()</code>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.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="i11" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getFreeSize--">getFreeSize</a></span>()</code>
<div class="block">Returns the free size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#getMaxSize--">getMaxSize</a></span>()</code>
<div class="block">Returns the Max size of the block cache, in bytes.</div>
</td>
</tr>
<tr id="i13" 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/BlockCache.html#getStats--">getStats</a></span>()</code>
<div class="block">Get the statistics for this block cache.</div>
</td>
</tr>
<tr id="i14" 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/BlockCache.html#iterator--">iterator</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#shutdown--">shutdown</a></span>()</code>
<div class="block">Shutdown the cache.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCache.html#size--">size</a></span>()</code>
<div class="block">Returns the total size of the block cache, in bytes.</div>
</td>
</tr>
</table>
<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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<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>void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.37">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,
boolean&nbsp;inMemory)</pre>
<div class="block">Add block to cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - The block's cache key.</dd>
<dd><code>buf</code> - The block contents wrapped in a ByteBuffer.</dd>
<dd><code>inMemory</code> - Whether block should be treated as in-memory</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>void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.44">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">Add block to cache (defaults to not in-memory).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - The block's cache key.</dd>
<dd><code>buf</code> - The object to cache.</dd>
</dl>
</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><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/BlockCache.html#line.55">getBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics)</pre>
<div class="block">Fetch block from cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - Block to fetch.</dd>
<dd><code>caching</code> - Whether this request has caching enabled (used for stats)</dd>
<dd><code>repeat</code> - Whether this is a repeat lookup for the same block
(used to avoid double counting cache misses when doing double-check locking)</dd>
<dd><code>updateCacheMetrics</code> - Whether to update cache metrics or not</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Block or null if block is not in 2 cache.</dd>
</dl>
</li>
</ul>
<a name="getBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-boolean-boolean-boolean-org.apache.hadoop.hbase.io.hfile.BlockType-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlock</h4>
<pre>default&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/BlockCache.html#line.68">getBlock</a>(<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheKey.html" title="class in org.apache.hadoop.hbase.io.hfile">BlockCacheKey</a>&nbsp;cacheKey,
boolean&nbsp;caching,
boolean&nbsp;repeat,
boolean&nbsp;updateCacheMetrics,
<a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockType.html" title="enum in org.apache.hadoop.hbase.io.hfile">BlockType</a>&nbsp;blockType)</pre>
<div class="block">Fetch block from cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - Block to fetch.</dd>
<dd><code>caching</code> - Whether this request has caching enabled (used for stats)</dd>
<dd><code>repeat</code> - Whether this is a repeat lookup for the same block
(used to avoid double counting cache misses when doing double-check locking)</dd>
<dd><code>updateCacheMetrics</code> - Whether to update cache metrics or not</dd>
<dd><code>blockType</code> - BlockType</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Block or null if block is not in 2 cache.</dd>
</dl>
</li>
</ul>
<a name="evictBlock-org.apache.hadoop.hbase.io.hfile.BlockCacheKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlock</h4>
<pre>boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.78">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">Evict block from cache.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>cacheKey</code> - Block to evict</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if block existed and was evicted, false if not</dd>
</dl>
</li>
</ul>
<a name="evictBlocksByHfileName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evictBlocksByHfileName</h4>
<pre>int&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.85">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 the given HFile.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of blocks evicted</dd>
</dl>
</li>
</ul>
<a name="getStats--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStats</h4>
<pre><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/BlockCache.html#line.91">getStats</a>()</pre>
<div class="block">Get the statistics for this block cache.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Stats</dd>
</dl>
</li>
</ul>
<a name="shutdown--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre>void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.96">shutdown</a>()</pre>
<div class="block">Shutdown the cache.</div>
</li>
</ul>
<a name="size--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.102">size</a>()</pre>
<div class="block">Returns the total size of the block cache, in bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>size of cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getMaxSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxSize</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.108">getMaxSize</a>()</pre>
<div class="block">Returns the Max size of the block cache, in bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>size of cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getFreeSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFreeSize</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.114">getFreeSize</a>()</pre>
<div class="block">Returns the free size of the block cache, in bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>free space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getCurrentSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentSize</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.120">getCurrentSize</a>()</pre>
<div class="block">Returns the occupied size of the block cache, in bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getCurrentDataSize--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentDataSize</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.126">getCurrentDataSize</a>()</pre>
<div class="block">Returns the occupied size of data blocks, in bytes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>occupied space in cache, in bytes</dd>
</dl>
</li>
</ul>
<a name="getBlockCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBlockCount</h4>
<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.132">getBlockCount</a>()</pre>
<div class="block">Returns the number of blocks currently cached in the block cache.</div>
<dl>
<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>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/io/hfile/BlockCache.html#line.138">getDataBlockCount</a>()</pre>
<div class="block">Returns the number of data blocks currently cached in the block cache.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of blocks in the cache</dd>
</dl>
</li>
</ul>
<a name="iterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre><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/BlockCache.html#line.144">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="returnLabel">Returns:</span></dt>
<dd>Iterator over the blocks in the cache.</dd>
</dl>
</li>
</ul>
<a name="getBlockCaches--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBlockCaches</h4>
<pre><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/BlockCache.html#line.149">getBlockCaches</a>()</pre>
<dl>
<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>
</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/BlockCache.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/AgeSnapshot.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/io/hfile/BlockCacheFactory.html" title="class in org.apache.hadoop.hbase.io.hfile"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/io/hfile/BlockCache.html" target="_top">Frames</a></li>
<li><a href="BlockCache.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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>