cassandra-server
Version:
A thin Javascript wrapper around Apache Cassandra to provide out of the box server support
329 lines (328 loc) • 13.3 kB
HTML
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_67) on Sun Sep 07 15:29:29 CEST 2014 -->
<title>IFailureDetector (apache-cassandra API)</title>
<meta name="date" content="2014-09-07">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IFailureDetector (apache-cassandra API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/IFailureDetector.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/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/gms/TokenSerializer.html" title="class in org.apache.cassandra.gms"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/gms/IFailureDetector.html" target="_top">Frames</a></li>
<li><a href="IFailureDetector.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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.cassandra.gms</div>
<h2 title="Interface IFailureDetector" class="title">Interface IFailureDetector</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/cassandra/gms/FailureDetector.html" title="class in org.apache.cassandra.gms">FailureDetector</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IFailureDetector</span></pre>
<div class="block">An interface that provides an application with the ability
to query liveness information of a node in the cluster. It
also exposes methods which help an application register callbacks
for notifications of liveness information of nodes.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#forceConviction(java.net.InetAddress)">forceConviction</a></strong>(java.net.InetAddress ep)</code>
<div class="block">force conviction of endpoint in the failure detector</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#interpret(java.net.InetAddress)">interpret</a></strong>(java.net.InetAddress ep)</code>
<div class="block">This method is invoked by any entity wanting to interrogate the status of an endpoint.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#isAlive(java.net.InetAddress)">isAlive</a></strong>(java.net.InetAddress ep)</code>
<div class="block">Failure Detector's knowledge of whether a node is up or
down.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#registerFailureDetectionEventListener(org.apache.cassandra.gms.IFailureDetectionEventListener)">registerFailureDetectionEventListener</a></strong>(<a href="../../../../org/apache/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms">IFailureDetectionEventListener</a> listener)</code>
<div class="block">Register interest for Failure Detector events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#remove(java.net.InetAddress)">remove</a></strong>(java.net.InetAddress ep)</code>
<div class="block">remove endpoint from failure detector</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#report(java.net.InetAddress)">report</a></strong>(java.net.InetAddress ep)</code>
<div class="block">This method is invoked by the receiver of the heartbeat.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cassandra/gms/IFailureDetector.html#unregisterFailureDetectionEventListener(org.apache.cassandra.gms.IFailureDetectionEventListener)">unregisterFailureDetectionEventListener</a></strong>(<a href="../../../../org/apache/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms">IFailureDetectionEventListener</a> listener)</code>
<div class="block">Un-register interest for Failure Detector events.</div>
</td>
</tr>
</table>
</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="isAlive(java.net.InetAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAlive</h4>
<pre>boolean isAlive(java.net.InetAddress ep)</pre>
<div class="block">Failure Detector's knowledge of whether a node is up or
down.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ep</code> - endpoint in question.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if UP and false if DOWN.</dd></dl>
</li>
</ul>
<a name="interpret(java.net.InetAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>interpret</h4>
<pre>void interpret(java.net.InetAddress ep)</pre>
<div class="block">This method is invoked by any entity wanting to interrogate the status of an endpoint.
In our case it would be the Gossiper. The Failure Detector will then calculate Phi and
deem an endpoint as suspicious or alive as explained in the Hayashibara paper.
<p/>
param ep endpoint for which we interpret the inter arrival times.</div>
</li>
</ul>
<a name="report(java.net.InetAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>report</h4>
<pre>void report(java.net.InetAddress ep)</pre>
<div class="block">This method is invoked by the receiver of the heartbeat. In our case it would be
the Gossiper. Gossiper inform the Failure Detector on receipt of a heartbeat. The
FailureDetector will then sample the arrival time as explained in the paper.
<p/>
param ep endpoint being reported.</div>
</li>
</ul>
<a name="remove(java.net.InetAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>void remove(java.net.InetAddress ep)</pre>
<div class="block">remove endpoint from failure detector</div>
</li>
</ul>
<a name="forceConviction(java.net.InetAddress)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forceConviction</h4>
<pre>void forceConviction(java.net.InetAddress ep)</pre>
<div class="block">force conviction of endpoint in the failure detector</div>
</li>
</ul>
<a name="registerFailureDetectionEventListener(org.apache.cassandra.gms.IFailureDetectionEventListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerFailureDetectionEventListener</h4>
<pre>void registerFailureDetectionEventListener(<a href="../../../../org/apache/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms">IFailureDetectionEventListener</a> listener)</pre>
<div class="block">Register interest for Failure Detector events.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - implementation of an application provided IFailureDetectionEventListener</dd></dl>
</li>
</ul>
<a name="unregisterFailureDetectionEventListener(org.apache.cassandra.gms.IFailureDetectionEventListener)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unregisterFailureDetectionEventListener</h4>
<pre>void unregisterFailureDetectionEventListener(<a href="../../../../org/apache/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms">IFailureDetectionEventListener</a> listener)</pre>
<div class="block">Un-register interest for Failure Detector events.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>listener</code> - implementation of an application provided IFailureDetectionEventListener</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/IFailureDetector.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/cassandra/gms/IFailureDetectionEventListener.html" title="interface in org.apache.cassandra.gms"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/cassandra/gms/TokenSerializer.html" title="class in org.apache.cassandra.gms"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cassandra/gms/IFailureDetector.html" target="_top">Frames</a></li>
<li><a href="IFailureDetector.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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 © 2014 The Apache Software Foundation</small></p>
</body>
</html>