summaryrefslogtreecommitdiff
path: root/_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html
diff options
context:
space:
mode:
Diffstat (limited to '_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html')
-rw-r--r--_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html611
1 files changed, 611 insertions, 0 deletions
diff --git a/_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html b/_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html
new file mode 100644
index 000000000..3c8a7c6f0
--- /dev/null
+++ b/_released_docs/r3.8.1/apidocs/zookeeper-server/org/apache/zookeeper/server/quorum/LearnerSessionTracker.html
@@ -0,0 +1,611 @@
+<!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 (1.8.0_352) on Wed Jan 25 17:31:44 CET 2023 -->
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>LearnerSessionTracker (Apache ZooKeeper - Server 3.8.1 API)</title>
+<meta name="date" content="2023-01-25">
+<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="LearnerSessionTracker (Apache ZooKeeper - Server 3.8.1 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};
+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/LearnerSessionTracker.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/zookeeper/server/quorum/LearnerSender.html" title="class in org.apache.zookeeper.server.quorum"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
+<li><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSyncRequest.html" title="class in org.apache.zookeeper.server.quorum"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
+</ul>
+<ul class="navList">
+<li><a href="../../../../../index.html?org/apache/zookeeper/server/quorum/LearnerSessionTracker.html" target="_top">Frames</a></li>
+<li><a href="LearnerSessionTracker.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><a href="#fields.inherited.from.class.org.apache.zookeeper.server.quorum.UpgradeableSessionTracker">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>Field&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.zookeeper.server.quorum</div>
+<h2 title="Class LearnerSessionTracker" class="title">Class LearnerSessionTracker</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="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">org.apache.zookeeper.server.quorum.UpgradeableSessionTracker</a></li>
+<li>
+<ul class="inheritance">
+<li>org.apache.zookeeper.server.quorum.LearnerSessionTracker</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+<div class="description">
+<ul class="blockList">
+<li class="blockList">
+<dl>
+<dt>All Implemented Interfaces:</dt>
+<dd><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html" title="interface in org.apache.zookeeper.server">SessionTracker</a></dd>
+</dl>
+<hr>
+<br>
+<pre>public class <span class="typeNameLabel">LearnerSessionTracker</span>
+extends <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">UpgradeableSessionTracker</a></pre>
+<div class="block">The learner session tracker is used by learners (followers and observers) to
+ track zookeeper sessions which may or may not be echoed to the leader. When
+ a new session is created it is saved locally in a wrapped
+ LocalSessionTracker. It can subsequently be upgraded to a global session
+ as required. If an upgrade is requested the session is removed from local
+ collections while keeping the same session ID. It is up to the caller to
+ queue a session creation request for the leader.
+ A secondary function of the learner session tracker is to remember sessions
+ which have been touched in this service. This information is passed along
+ to the leader with a ping.</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>
+<ul class="blockList">
+<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.zookeeper.server.SessionTracker">
+<!-- -->
+</a>
+<h3>Nested classes/interfaces inherited from interface&nbsp;org.apache.zookeeper.server.<a href="../../../../../org/apache/zookeeper/server/SessionTracker.html" title="interface in org.apache.zookeeper.server">SessionTracker</a></h3>
+<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.Session.html" title="interface in org.apache.zookeeper.server">SessionTracker.Session</a>, <a href="../../../../../org/apache/zookeeper/server/SessionTracker.SessionExpirer.html" title="interface in org.apache.zookeeper.server">SessionTracker.SessionExpirer</a></code></li>
+</ul>
+</li>
+</ul>
+<!-- =========== FIELD SUMMARY =========== -->
+<ul class="blockList">
+<li class="blockList"><a name="field.summary">
+<!-- -->
+</a>
+<h3>Field Summary</h3>
+<ul class="blockList">
+<li class="blockList"><a name="fields.inherited.from.class.org.apache.zookeeper.server.quorum.UpgradeableSessionTracker">
+<!-- -->
+</a>
+<h3>Fields inherited from class&nbsp;org.apache.zookeeper.server.quorum.<a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">UpgradeableSessionTracker</a></h3>
+<code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#localSessionsEnabled">localSessionsEnabled</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#localSessionTracker">localSessionTracker</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/zookeeper/server/quorum/LearnerSessionTracker.html#LearnerSessionTracker-org.apache.zookeeper.server.SessionTracker.SessionExpirer-java.util.concurrent.ConcurrentMap-int-long-boolean-org.apache.zookeeper.server.ZooKeeperServerListener-">LearnerSessionTracker</a></span>(<a href="../../../../../org/apache/zookeeper/server/SessionTracker.SessionExpirer.html" title="interface in org.apache.zookeeper.server">SessionTracker.SessionExpirer</a>&nbsp;expirer,
+ <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentMap</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>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;sessionsWithTimeouts,
+ int&nbsp;tickTime,
+ long&nbsp;id,
+ boolean&nbsp;localSessionsEnabled,
+ <a href="../../../../../org/apache/zookeeper/server/ZooKeeperServerListener.html" title="interface in org.apache.zookeeper.server">ZooKeeperServerListener</a>&nbsp;listener)</code>&nbsp;</td>
+</tr>
+</table>
+</li>
+</ul>
+<!-- ========== METHOD SUMMARY =========== -->
+<ul class="blockList">
+<li class="blockList"><a name="method.summary">
+<!-- -->
+</a>
+<h3>Method Summary</h3>
+<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
+<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
+<tr>
+<th class="colFirst" scope="col">Modifier and Type</th>
+<th class="colLast" scope="col">Method and Description</th>
+</tr>
+<tr id="i0" class="altColor">
+<td class="colFirst"><code>void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#checkSession-long-java.lang.Object-">checkSession</a></span>(long&nbsp;sessionId,
+ <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>&nbsp;owner)</code>
+<div class="block">Checks whether the SessionTracker is aware of this session, the session
+ is still active, and the owner matches.</div>
+</td>
+</tr>
+<tr id="i1" class="rowColor">
+<td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#commitSession-long-int-">commitSession</a></span>(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</code>
+<div class="block">Synchronized on this to avoid race condition of adding a local session
+ after committed global session, which may cause the same session being
+ tracked on this server and leader.</div>
+</td>
+</tr>
+<tr id="i2" class="altColor">
+<td class="colFirst"><code>long</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#createSession-int-">createSession</a></span>(int&nbsp;sessionTimeout)</code>&nbsp;</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/zookeeper/server/quorum/LearnerSessionTracker.html#dumpSessions-java.io.PrintWriter-">dumpSessions</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a>&nbsp;pwriter)</code>
+<div class="block">Text dump of session information, suitable for debugging.</div>
+</td>
+</tr>
+<tr id="i4" class="altColor">
+<td class="colFirst"><code><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/Long.html?is-external=true" title="class or interface in java.lang">Long</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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;&gt;</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#getSessionExpiryMap--">getSessionExpiryMap</a></span>()</code>
+<div class="block">Returns a mapping of time to session IDs that expire at that time.</div>
+</td>
+</tr>
+<tr id="i5" class="rowColor">
+<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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/zookeeper/server/quorum/LearnerSessionTracker.html#globalSessions--">globalSessions</a></span>()</code>
+<div class="block">Get a set of global session IDs</div>
+</td>
+</tr>
+<tr id="i6" class="altColor">
+<td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#isGlobalSession-long-">isGlobalSession</a></span>(long&nbsp;sessionId)</code>&nbsp;</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/zookeeper/server/quorum/LearnerSessionTracker.html#removeSession-long-">removeSession</a></span>(long&nbsp;sessionId)</code>&nbsp;</td>
+</tr>
+<tr id="i8" class="altColor">
+<td class="colFirst"><code>void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#setOwner-long-java.lang.Object-">setOwner</a></span>(long&nbsp;sessionId,
+ <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>&nbsp;owner)</code>&nbsp;</td>
+</tr>
+<tr id="i9" class="rowColor">
+<td class="colFirst"><code>void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#setSessionClosing-long-">setSessionClosing</a></span>(long&nbsp;sessionId)</code>
+<div class="block">Mark that the session is in the process of closing.</div>
+</td>
+</tr>
+<tr id="i10" class="altColor">
+<td class="colFirst"><code>void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#shutdown--">shutdown</a></span>()</code>&nbsp;</td>
+</tr>
+<tr id="i11" class="rowColor">
+<td class="colFirst"><code><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/Long.html?is-external=true" title="class or interface in java.lang">Long</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#snapshot--">snapshot</a></span>()</code>&nbsp;</td>
+</tr>
+<tr id="i12" class="altColor">
+<td class="colFirst"><code>void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#start--">start</a></span>()</code>&nbsp;</td>
+</tr>
+<tr id="i13" class="rowColor">
+<td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#touchSession-long-int-">touchSession</a></span>(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</code>&nbsp;</td>
+</tr>
+<tr id="i14" class="altColor">
+<td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSessionTracker.html#trackSession-long-int-">trackSession</a></span>(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</code>
+<div class="block">Track the session expire, not add to ZkDb.</div>
+</td>
+</tr>
+</table>
+<ul class="blockList">
+<li class="blockList"><a name="methods.inherited.from.class.org.apache.zookeeper.server.quorum.UpgradeableSessionTracker">
+<!-- -->
+</a>
+<h3>Methods inherited from class&nbsp;org.apache.zookeeper.server.quorum.<a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">UpgradeableSessionTracker</a></h3>
+<code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#checkGlobalSession-long-java.lang.Object-">checkGlobalSession</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#createLocalSessionTracker-org.apache.zookeeper.server.SessionTracker.SessionExpirer-int-long-org.apache.zookeeper.server.ZooKeeperServerListener-">createLocalSessionTracker</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#finishedUpgrading-long-">finishedUpgrading</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#getLocalSessionCount--">getLocalSessionCount</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#isLocalSession-long-">isLocalSession</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#isLocalSessionsEnabled--">isLocalSessionsEnabled</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#isTrackingSession-long-">isTrackingSession</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#isUpgradingSession-long-">isUpgradingSession</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#localSessions--">localSessions</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#removeLocalSession-long-">removeLocalSession</a>, <a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#upgradeSession-long-">upgradeSession</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#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="details">
+<ul class="blockList">
+<li class="blockList">
+<!-- ========= CONSTRUCTOR DETAIL ======== -->
+<ul class="blockList">
+<li class="blockList"><a name="constructor.detail">
+<!-- -->
+</a>
+<h3>Constructor Detail</h3>
+<a name="LearnerSessionTracker-org.apache.zookeeper.server.SessionTracker.SessionExpirer-java.util.concurrent.ConcurrentMap-int-long-boolean-org.apache.zookeeper.server.ZooKeeperServerListener-">
+<!-- -->
+</a>
+<ul class="blockListLast">
+<li class="blockList">
+<h4>LearnerSessionTracker</h4>
+<pre>public&nbsp;LearnerSessionTracker(<a href="../../../../../org/apache/zookeeper/server/SessionTracker.SessionExpirer.html" title="interface in org.apache.zookeeper.server">SessionTracker.SessionExpirer</a>&nbsp;expirer,
+ <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentMap</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>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;sessionsWithTimeouts,
+ int&nbsp;tickTime,
+ long&nbsp;id,
+ boolean&nbsp;localSessionsEnabled,
+ <a href="../../../../../org/apache/zookeeper/server/ZooKeeperServerListener.html" title="interface in org.apache.zookeeper.server">ZooKeeperServerListener</a>&nbsp;listener)</pre>
+</li>
+</ul>
+</li>
+</ul>
+<!-- ============ METHOD DETAIL ========== -->
+<ul class="blockList">
+<li class="blockList"><a name="method.detail">
+<!-- -->
+</a>
+<h3>Method Detail</h3>
+<a name="removeSession-long-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>removeSession</h4>
+<pre>public&nbsp;void&nbsp;removeSession(long&nbsp;sessionId)</pre>
+</li>
+</ul>
+<a name="start--">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>start</h4>
+<pre>public&nbsp;void&nbsp;start()</pre>
+<dl>
+<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
+<dd><code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#start--">start</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">UpgradeableSessionTracker</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="shutdown--">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>shutdown</h4>
+<pre>public&nbsp;void&nbsp;shutdown()</pre>
+</li>
+</ul>
+<a name="isGlobalSession-long-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isGlobalSession</h4>
+<pre>public&nbsp;boolean&nbsp;isGlobalSession(long&nbsp;sessionId)</pre>
+<dl>
+<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
+<dd><code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html#isGlobalSession-long-">isGlobalSession</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.html" title="class in org.apache.zookeeper.server.quorum">UpgradeableSessionTracker</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="trackSession-long-int-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>trackSession</h4>
+<pre>public&nbsp;boolean&nbsp;trackSession(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#trackSession-long-int-">SessionTracker</a></code></span></div>
+<div class="block">Track the session expire, not add to ZkDb.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>sessionId</code> - sessionId</dd>
+<dd><code>sessionTimeout</code> - sessionTimeout</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>whether the session was newly tracked (if false, already tracked)</dd>
+</dl>
+</li>
+</ul>
+<a name="commitSession-long-int-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>commitSession</h4>
+<pre>public&nbsp;boolean&nbsp;commitSession(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</pre>
+<div class="block">Synchronized on this to avoid race condition of adding a local session
+ after committed global session, which may cause the same session being
+ tracked on this server and leader.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>sessionId</code> - sessionId</dd>
+<dd><code>sessionTimeout</code> - sessionTimeout</dd>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>whether the session was newly added (if false, already existed)</dd>
+</dl>
+</li>
+</ul>
+<a name="touchSession-long-int-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>touchSession</h4>
+<pre>public&nbsp;boolean&nbsp;touchSession(long&nbsp;sessionId,
+ int&nbsp;sessionTimeout)</pre>
+<dl>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>false if session is no longer active</dd>
+</dl>
+</li>
+</ul>
+<a name="snapshot--">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>snapshot</h4>
+<pre>public&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/Long.html?is-external=true" title="class or interface in java.lang">Long</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>&gt;&nbsp;snapshot()</pre>
+</li>
+</ul>
+<a name="createSession-int-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>createSession</h4>
+<pre>public&nbsp;long&nbsp;createSession(int&nbsp;sessionTimeout)</pre>
+</li>
+</ul>
+<a name="checkSession-long-java.lang.Object-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>checkSession</h4>
+<pre>public&nbsp;void&nbsp;checkSession(long&nbsp;sessionId,
+ <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>&nbsp;owner)
+ throws <a href="../../../../../org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper">KeeperException.SessionExpiredException</a>,
+ <a href="../../../../../org/apache/zookeeper/KeeperException.SessionMovedException.html" title="class in org.apache.zookeeper">KeeperException.SessionMovedException</a></pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#checkSession-long-java.lang.Object-">SessionTracker</a></code></span></div>
+<div class="block">Checks whether the SessionTracker is aware of this session, the session
+ is still active, and the owner matches. If the owner wasn't previously
+ set, this sets the owner of the session.
+
+ UnknownSessionException should never been thrown to the client. It is
+ only used internally to deal with possible local session from other
+ machine</div>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a href="../../../../../org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper">KeeperException.SessionExpiredException</a></code></dd>
+<dd><code><a href="../../../../../org/apache/zookeeper/KeeperException.SessionMovedException.html" title="class in org.apache.zookeeper">KeeperException.SessionMovedException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="setOwner-long-java.lang.Object-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setOwner</h4>
+<pre>public&nbsp;void&nbsp;setOwner(long&nbsp;sessionId,
+ <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>&nbsp;owner)
+ throws <a href="../../../../../org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper">KeeperException.SessionExpiredException</a></pre>
+<dl>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a href="../../../../../org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper">KeeperException.SessionExpiredException</a></code></dd>
+</dl>
+</li>
+</ul>
+<a name="dumpSessions-java.io.PrintWriter-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>dumpSessions</h4>
+<pre>public&nbsp;void&nbsp;dumpSessions(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a>&nbsp;pwriter)</pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#dumpSessions-java.io.PrintWriter-">SessionTracker</a></code></span></div>
+<div class="block">Text dump of session information, suitable for debugging.</div>
+<dl>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>pwriter</code> - the output writer</dd>
+</dl>
+</li>
+</ul>
+<a name="setSessionClosing-long-">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>setSessionClosing</h4>
+<pre>public&nbsp;void&nbsp;setSessionClosing(long&nbsp;sessionId)</pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#setSessionClosing-long-">SessionTracker</a></code></span></div>
+<div class="block">Mark that the session is in the process of closing.</div>
+</li>
+</ul>
+<a name="getSessionExpiryMap--">
+<!-- -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getSessionExpiryMap</h4>
+<pre>public&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/Long.html?is-external=true" title="class or interface in java.lang">Long</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</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;&gt;&nbsp;getSessionExpiryMap()</pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#getSessionExpiryMap--">SessionTracker</a></code></span></div>
+<div class="block">Returns a mapping of time to session IDs that expire at that time.</div>
+</li>
+</ul>
+<a name="globalSessions--">
+<!-- -->
+</a>
+<ul class="blockListLast">
+<li class="blockList">
+<h4>globalSessions</h4>
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;globalSessions()</pre>
+<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/zookeeper/server/SessionTracker.html#globalSessions--">SessionTracker</a></code></span></div>
+<div class="block">Get a set of global session IDs</div>
+</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/LearnerSessionTracker.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/zookeeper/server/quorum/LearnerSender.html" title="class in org.apache.zookeeper.server.quorum"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
+<li><a href="../../../../../org/apache/zookeeper/server/quorum/LearnerSyncRequest.html" title="class in org.apache.zookeeper.server.quorum"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
+</ul>
+<ul class="navList">
+<li><a href="../../../../../index.html?org/apache/zookeeper/server/quorum/LearnerSessionTracker.html" target="_top">Frames</a></li>
+<li><a href="LearnerSessionTracker.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><a href="#fields.inherited.from.class.org.apache.zookeeper.server.quorum.UpgradeableSessionTracker">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>Field&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; 2008&#x2013;2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
+</body>
+</html>