blob: b8d6e305dce858603175ffe441b736226b7c1300 [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>LeaseManager (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="LeaseManager (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};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/LeaseManager.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/regionserver/LeaseListener.html" title="interface in org.apache.hadoop.hbase.regionserver"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/regionserver/LeaseManager.html" target="_top">Frames</a></li>
<li><a href="LeaseManager.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.regionserver</div>
<h2 title="Class LeaseManager" class="title">Class LeaseManager</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><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">java.lang.Thread</a></li>
<li>
<ul class="inheritance">
<li>org.apache.hadoop.hbase.regionserver.LeaseManager</li>
</ul>
</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/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></dd>
</dl>
<hr>
<br>
<pre>@InterfaceAudience.Private
public class <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.55">LeaseManager</a>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">Thread</a></pre>
<div class="block">Leases
There are several server classes in HBase that need to track external
clients that occasionally send heartbeats.
<p>These external clients hold resources in the server class.
Those resources need to be released if the external client fails to send a
heartbeat after some interval of time passes.
<p>The Leases class is a general reusable class for this kind of pattern.
An instance of the Leases class will create a thread to do its dirty work.
You should close() the instance if you want to clean up the thread properly.
<p>
NOTE: This class extends Thread rather than Chore because the sleep time
can be interrupted when there is something to do, rather than the Chore
sleep time which is invariant.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a></span></code>
<div class="block">This class tracks a single Lease.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.LeaseStillHeldException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.LeaseStillHeldException</a></span></code>
<div class="block">Thrown if we are asked to create a lease but lease on passed name already
exists.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.java.lang.Thread">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">Thread</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.State.html?is-external=true" title="class or interface in java.lang">Thread.State</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.UncaughtExceptionHandler.html?is-external=true" title="class or interface in java.lang">Thread.UncaughtExceptionHandler</a></code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#leaseCheckFrequency">leaseCheckFrequency</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/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<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="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#leases">leases</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static org.slf4j.Logger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#LOG">LOG</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/regionserver/LeaseManager.html#MIN_WAIT_TIME">MIN_WAIT_TIME</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/regionserver/LeaseManager.html#stopRequested">stopRequested</a></span></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.java.lang.Thread">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">Thread</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#MAX_PRIORITY" title="class or interface in java.lang">MAX_PRIORITY</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#MIN_PRIORITY" title="class or interface in java.lang">MIN_PRIORITY</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#NORM_PRIORITY" title="class or interface in java.lang">NORM_PRIORITY</a></code></li>
</ul>
</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/regionserver/LeaseManager.html#LeaseManager-int-">LeaseManager</a></span>(int&nbsp;leaseCheckFrequency)</code>
<div class="block">Creates a lease manager.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#addLease-org.apache.hadoop.hbase.regionserver.LeaseManager.Lease-">addLease</a></span>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&nbsp;lease)</code>
<div class="block">Inserts lease.</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/regionserver/LeaseManager.html#cancelLease-java.lang.String-">cancelLease</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;leaseName)</code>
<div class="block">Client explicitly cancels a lease.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#close--">close</a></span>()</code>
<div class="block">Shut down this Leases instance.</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/regionserver/LeaseManager.html#closeAfterLeasesExpire--">closeAfterLeasesExpire</a></span>()</code>
<div class="block">Shuts down this lease instance when all outstanding leases expire.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#createLease-java.lang.String-int-org.apache.hadoop.hbase.regionserver.LeaseListener-">createLease</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;leaseName,
int&nbsp;leaseTimeoutPeriod,
<a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseListener.html" title="interface in org.apache.hadoop.hbase.regionserver">LeaseListener</a>&nbsp;listener)</code>
<div class="block">Create a lease and insert it to the map of leases.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>(package private) <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#removeLease-java.lang.String-">removeLease</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;leaseName)</code>
<div class="block">Remove named lease.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#renewLease-java.lang.String-">renewLease</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;leaseName)</code>
<div class="block">Renew a lease</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#run--">run</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Thread">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">Thread</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#activeCount--" title="class or interface in java.lang">activeCount</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#checkAccess--" title="class or interface in java.lang">checkAccess</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.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/Thread.html?is-external=true#countStackFrames--" title="class or interface in java.lang">countStackFrames</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#currentThread--" title="class or interface in java.lang">currentThread</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#destroy--" title="class or interface in java.lang">destroy</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#dumpStack--" title="class or interface in java.lang">dumpStack</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#enumerate-java.lang.Thread:A-" title="class or interface in java.lang">enumerate</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getAllStackTraces--" title="class or interface in java.lang">getAllStackTraces</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getContextClassLoader--" title="class or interface in java.lang">getContextClassLoader</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getDefaultUncaughtExceptionHandler--" title="class or interface in java.lang">getDefaultUncaughtExceptionHandler</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getId--" title="class or interface in java.lang">getId</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getName--" title="class or interface in java.lang">getName</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getPriority--" title="class or interface in java.lang">getPriority</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getStackTrace--" title="class or interface in java.lang">getStackTrace</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getState--" title="class or interface in java.lang">getState</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getThreadGroup--" title="class or interface in java.lang">getThreadGroup</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#getUncaughtExceptionHandler--" title="class or interface in java.lang">getUncaughtExceptionHandler</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#holdsLock-java.lang.Object-" title="class or interface in java.lang">holdsLock</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupt--" title="class or interface in java.lang">interrupt</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#interrupted--" title="class or interface in java.lang">interrupted</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#isAlive--" title="class or interface in java.lang">isAlive</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#isDaemon--" title="class or interface in java.lang">isDaemon</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#isInterrupted--" title="class or interface in java.lang">isInterrupted</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#join--" title="class or interface in java.lang">join</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#join-long-" title="class or interface in java.lang">join</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#join-long-int-" title="class or interface in java.lang">join</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#resume--" title="class or interface in java.lang">resume</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setContextClassLoader-java.lang.ClassLoader-" title="class or interface in java.lang">setContextClassLoader</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setDaemon-boolean-" title="class or interface in java.lang">setDaemon</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setDefaultUncaughtExceptionHandler-java.lang.Thread.UncaughtExceptionHandler-" title="class or interface in java.lang">setDefaultUncaughtExceptionHandler</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setName-java.lang.String-" title="class or interface in java.lang">setName</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setPriority-int-" title="class or interface in java.lang">setPriority</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#setUncaughtExceptionHandler-java.lang.Thread.UncaughtExceptionHandler-" title="class or interface in java.lang">setUncaughtExceptionHandler</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#sleep-long-" title="class or interface in java.lang">sleep</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#sleep-long-int-" title="class or interface in java.lang">sleep</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#start--" title="class or interface in java.lang">start</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#stop--" title="class or interface in java.lang">stop</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#stop-java.lang.Throwable-" title="class or interface in java.lang">stop</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#suspend--" title="class or interface in java.lang">suspend</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.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/Thread.html?is-external=true#yield--" title="class or interface in java.lang">yield</a></code></li>
</ul>
<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#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#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ 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/regionserver/LeaseManager.html#line.56">LOG</a></pre>
</li>
</ul>
<a name="MIN_WAIT_TIME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MIN_WAIT_TIME</h4>
<pre>private static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.57">MIN_WAIT_TIME</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.regionserver.LeaseManager.MIN_WAIT_TIME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="leases">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>leases</h4>
<pre>private final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<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="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.59">leases</a></pre>
</li>
</ul>
<a name="leaseCheckFrequency">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>leaseCheckFrequency</h4>
<pre>private final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.60">leaseCheckFrequency</a></pre>
</li>
</ul>
<a name="stopRequested">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stopRequested</h4>
<pre>private volatile&nbsp;boolean <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.61">stopRequested</a></pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="LeaseManager-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LeaseManager</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.68">LeaseManager</a>(int&nbsp;leaseCheckFrequency)</pre>
<div class="block">Creates a lease manager.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>leaseCheckFrequency</code> - - how often the lease should be checked (milliseconds)</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="run--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.75">run</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/Runnable.html?is-external=true#run--" title="class or interface in java.lang">run</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true#run--" title="class or interface in java.lang">run</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html?is-external=true" title="class or interface in java.lang">Thread</a></code></dd>
</dl>
</li>
</ul>
<a name="closeAfterLeasesExpire--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeAfterLeasesExpire</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.131">closeAfterLeasesExpire</a>()</pre>
<div class="block">Shuts down this lease instance when all outstanding leases expire.
Like <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.html#close--"><code>close()</code></a> but rather than violently end all leases, waits
first on extant leases to finish. Use this method if the lease holders
could lose data, leak locks, etc. Presumes client has shutdown
allocation of new leases.</div>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.139">close</a>()</pre>
<div class="block">Shut down this Leases instance. All pending leases will be destroyed,
without any cancellation calls.</div>
</li>
</ul>
<a name="createLease-java.lang.String-int-org.apache.hadoop.hbase.regionserver.LeaseListener-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createLease</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.153">createLease</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;leaseName,
int&nbsp;leaseTimeoutPeriod,
<a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseListener.html" title="interface in org.apache.hadoop.hbase.regionserver">LeaseListener</a>&nbsp;listener)
throws <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.LeaseStillHeldException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.LeaseStillHeldException</a></pre>
<div class="block">Create a lease and insert it to the map of leases.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>leaseName</code> - name of the lease</dd>
<dd><code>leaseTimeoutPeriod</code> - length of the lease in milliseconds</dd>
<dd><code>listener</code> - listener that will process lease expirations</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The lease created.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.LeaseStillHeldException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.LeaseStillHeldException</a></code></dd>
</dl>
</li>
</ul>
<a name="addLease-org.apache.hadoop.hbase.regionserver.LeaseManager.Lease-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addLease</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.163">addLease</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&nbsp;lease)
throws <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.LeaseStillHeldException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.LeaseStillHeldException</a></pre>
<div class="block">Inserts lease. Resets expiration before insertion.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.LeaseStillHeldException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.LeaseStillHeldException</a></code></dd>
</dl>
</li>
</ul>
<a name="renewLease-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>renewLease</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.179">renewLease</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;leaseName)
throws <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></pre>
<div class="block">Renew a lease</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>leaseName</code> - name of the lease</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></code></dd>
</dl>
</li>
</ul>
<a name="cancelLease-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cancelLease</h4>
<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.197">cancelLease</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;leaseName)
throws <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></pre>
<div class="block">Client explicitly cancels a lease.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>leaseName</code> - name of lease</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></code></dd>
</dl>
</li>
</ul>
<a name="removeLease-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>removeLease</h4>
<pre><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseManager.Lease</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/LeaseManager.html#line.207">removeLease</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;leaseName)
throws <a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></pre>
<div class="block">Remove named lease. Lease is removed from the map of leases.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>leaseName</code> - name of lease</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Removed lease</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseException.html" title="class in org.apache.hadoop.hbase.regionserver">LeaseException</a></code></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/LeaseManager.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/regionserver/LeaseListener.html" title="interface in org.apache.hadoop.hbase.regionserver"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/hadoop/hbase/regionserver/LeaseManager.Lease.html" title="class in org.apache.hadoop.hbase.regionserver"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/hadoop/hbase/regionserver/LeaseManager.html" target="_top">Frames</a></li>
<li><a href="LeaseManager.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>