blob: f90923c42ee988d331b7d6d8a96028158b909d42 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.21) on Mon Feb 12 21:00:12 UTC 2024 -->
<title>Command (Apache ZooKeeper - Server 3.9.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2024-02-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Command (Apache ZooKeeper - Server 3.9.2 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Command.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" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.zookeeper.server.admin</a></div>
<h2 title="Interface Command" class="title">Interface Command</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="CommandBase.html" title="class in org.apache.zookeeper.server.admin">CommandBase</a></code>, <code><a href="Commands.CnxnStatResetCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.CnxnStatResetCommand</a></code>, <code><a href="Commands.ConfCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.ConfCommand</a></code>, <code><a href="Commands.ConsCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.ConsCommand</a></code>, <code><a href="Commands.DigestCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.DigestCommand</a></code>, <code><a href="Commands.DirsCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.DirsCommand</a></code>, <code><a href="Commands.DumpCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.DumpCommand</a></code>, <code><a href="Commands.EnvCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.EnvCommand</a></code>, <code><a href="Commands.GetTraceMaskCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.GetTraceMaskCommand</a></code>, <code><a href="Commands.InitialConfigurationCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.InitialConfigurationCommand</a></code>, <code><a href="Commands.IsroCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.IsroCommand</a></code>, <code><a href="Commands.LastSnapshotCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.LastSnapshotCommand</a></code>, <code><a href="Commands.LeaderCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.LeaderCommand</a></code>, <code><a href="Commands.MonitorCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.MonitorCommand</a></code>, <code><a href="Commands.ObserverCnxnStatResetCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.ObserverCnxnStatResetCommand</a></code>, <code><a href="Commands.RestoreCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.RestoreCommand</a></code>, <code><a href="Commands.RuokCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.RuokCommand</a></code>, <code><a href="Commands.SetTraceMaskCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.SetTraceMaskCommand</a></code>, <code><a href="Commands.SnapshotCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.SnapshotCommand</a></code>, <code><a href="Commands.SrvrCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.SrvrCommand</a></code>, <code><a href="Commands.StatCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.StatCommand</a></code>, <code><a href="Commands.StatResetCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.StatResetCommand</a></code>, <code><a href="Commands.SyncedObserverConsCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.SyncedObserverConsCommand</a></code>, <code><a href="Commands.SystemPropertiesCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.SystemPropertiesCommand</a></code>, <code><a href="Commands.VotingViewCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.VotingViewCommand</a></code>, <code><a href="Commands.WatchCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.WatchCommand</a></code>, <code><a href="Commands.WatchesByPathCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.WatchesByPathCommand</a></code>, <code><a href="Commands.WatchSummaryCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.WatchSummaryCommand</a></code>, <code><a href="Commands.ZabStateCommand.html" title="class in org.apache.zookeeper.server.admin">Commands.ZabStateCommand</a></code>, <code><a href="GetCommand.html" title="class in org.apache.zookeeper.server.admin">GetCommand</a></code>, <code><a href="PostCommand.html" title="class in org.apache.zookeeper.server.admin">PostCommand</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">Command</span></pre>
<div class="block">Interface implemented by all commands runnable by JettyAdminServer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="CommandBase.html" title="class in org.apache.zookeeper.server.admin"><code>CommandBase</code></a>,
<a href="Commands.html" title="class in org.apache.zookeeper.server.admin"><code>Commands</code></a>,
<a href="JettyAdminServer.html" title="class in org.apache.zookeeper.server.admin"><code>JettyAdminServer</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<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></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="AuthRequest.html" title="class in org.apache.zookeeper.server.admin">AuthRequest</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAuthRequest()">getAuthRequest</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i1" 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" class="externalLink">Set</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" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNames()">getNames</a></span>()</code></th>
<td class="colLast">
<div class="block">The set of all names that can be used to refer to this command (e.g.,
"configuration", "config", and "conf").</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPrimaryName()">getPrimaryName</a></span>()</code></th>
<td class="colLast">
<div class="block">The name that is returned with the command response and that appears in
the list of all commands.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isServerRequired()">isServerRequired</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="CommandResponse.html" title="class in org.apache.zookeeper.server.admin">CommandResponse</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#runGet(org.apache.zookeeper.server.ZooKeeperServer,java.util.Map)">runGet</a></span>&#8203;(<a href="../ZooKeeperServer.html" title="class in org.apache.zookeeper.server">ZooKeeperServer</a>&nbsp;zkServer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">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" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;kwargs)</code></th>
<td class="colLast">
<div class="block">Run this command for HTTP GET request.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="CommandResponse.html" title="class in org.apache.zookeeper.server.admin">CommandResponse</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#runPost(org.apache.zookeeper.server.ZooKeeperServer,java.io.InputStream)">runPost</a></span>&#8203;(<a href="../ZooKeeperServer.html" title="class in org.apache.zookeeper.server">ZooKeeperServer</a>&nbsp;zkServer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;inputStream)</code></th>
<td class="colLast">
<div class="block">Run this command for HTTP POST.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNames</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</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" class="externalLink">String</a>&gt;&nbsp;getNames()</pre>
<div class="block">The set of all names that can be used to refer to this command (e.g.,
"configuration", "config", and "conf").</div>
</li>
</ul>
<a id="getPrimaryName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimaryName</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getPrimaryName()</pre>
<div class="block">The name that is returned with the command response and that appears in
the list of all commands. This should be a member of the set returned by
getNames().</div>
</li>
</ul>
<a id="isServerRequired()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isServerRequired</h4>
<pre class="methodSignature">boolean&nbsp;isServerRequired()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the command requires an active ZooKeeperServer or a
synced peer in order to resolve</dd>
</dl>
</li>
</ul>
<a id="getAuthRequest()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAuthRequest</h4>
<pre class="methodSignature"><a href="AuthRequest.html" title="class in org.apache.zookeeper.server.admin">AuthRequest</a>&nbsp;getAuthRequest()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>AuthRequest associated to the command. Null means auth check is not required.</dd>
</dl>
</li>
</ul>
<a id="runGet(org.apache.zookeeper.server.ZooKeeperServer,java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runGet</h4>
<pre class="methodSignature"><a href="CommandResponse.html" title="class in org.apache.zookeeper.server.admin">CommandResponse</a>&nbsp;runGet&#8203;(<a href="../ZooKeeperServer.html" title="class in org.apache.zookeeper.server">ZooKeeperServer</a>&nbsp;zkServer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util" class="externalLink">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" class="externalLink">String</a>,&#8203;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;kwargs)</pre>
<div class="block">Run this command for HTTP GET request. Commands take a ZooKeeperServer, String-valued keyword
arguments and return a CommandResponse object containing any information
constituting the response to the command. Commands are responsible for
parsing keyword arguments and performing any error handling if necessary.
Errors should be reported by setting the "error" entry of the returned
map with an appropriate message rather than throwing an exception.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>zkServer</code> - ZooKeeper server</dd>
<dd><code>kwargs</code> - keyword -&gt; argument value mapping</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>CommandResponse representing response to command containing at minimum:
- "command" key containing the command's primary name
- "error" key containing a String error message or null if no error</dd>
</dl>
</li>
</ul>
<a id="runPost(org.apache.zookeeper.server.ZooKeeperServer,java.io.InputStream)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>runPost</h4>
<pre class="methodSignature"><a href="CommandResponse.html" title="class in org.apache.zookeeper.server.admin">CommandResponse</a>&nbsp;runPost&#8203;(<a href="../ZooKeeperServer.html" title="class in org.apache.zookeeper.server">ZooKeeperServer</a>&nbsp;zkServer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;inputStream)</pre>
<div class="block">Run this command for HTTP POST. Commands take a ZooKeeperServer and InputStream and
return a CommandResponse object containing any information
constituting the response to the command. Commands are responsible for
parsing keyword arguments and performing any error handling if necessary.
Errors should be reported by setting the "error" entry of the returned
map with an appropriate message rather than throwing an exception.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>zkServer</code> - ZooKeeper server</dd>
<dd><code>inputStream</code> - InputStream from request</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>CommandResponse representing response to command containing at minimum:
- "command" key containing the command's primary name
- "error" key containing a String error message or null if no error</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Command.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" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.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>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</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 id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>