| <!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.7.0_131) on Fri Mar 10 00:29:14 UTC 2017 --> |
| <title>Log</title> |
| <meta name="date" content="2017-03-10"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Log"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </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="../../../org/apache/mesos/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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/mesos/ExecutorDriver.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/mesos/Log.Entry.html" title="class in org.apache.mesos"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/mesos/Log.html" target="_top">Frames</a></li> |
| <li><a href="Log.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><a href="#nested_class_summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </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.mesos</div> |
| <h2 title="Class Log" class="title">Class Log</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.mesos.Log</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">Log</span> |
| extends java.lang.Object</pre> |
| <div class="block">Provides access to a distributed append only log. The log can be |
| read from using a <a href="../../../org/apache/mesos/Log.Reader.html" title="class in org.apache.mesos"><code>Log.Reader</code></a> and written to using a |
| <a href="../../../org/apache/mesos/Log.Writer.html" title="class in org.apache.mesos"><code>Log.Writer</code></a>. |
| |
| <p>Both the <i>Reader</i> and <i>Writer</i> will require a <i>quorum</i> |
| which defines the <i>ratio of active Mesos Masters</i> that need to be |
| available for a successful read or write. The <i>quorum</i> will be satisfied |
| when the number of <i>active Masters</i> is greater than the given |
| <i>number</i>: |
| <pre><code>Quorum > (Number of Masters)/2 |
| </code></pre> |
| |
| <p>If a <i>read</i> or <i>write</i> is executed the operation will wait |
| until their is <i>quorum</i> to succeed.</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="overviewSummary" 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"> </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>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.Entry.html" title="class in org.apache.mesos">Log.Entry</a></strong></code> |
| <div class="block">Represents an opaque data entry in the <a href="../../../org/apache/mesos/Log.html" title="class in org.apache.mesos"><code>Log</code></a> with a |
| <a href="../../../org/apache/mesos/Log.Position.html" title="class in org.apache.mesos"><code>Log.Position</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.OperationFailedException.html" title="class in org.apache.mesos">Log.OperationFailedException</a></strong></code> |
| <div class="block">An exception that gets thrown when an error occurs while |
| performing a read or write operation.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.Position.html" title="class in org.apache.mesos">Log.Position</a></strong></code> |
| <div class="block">An opaque identifier of a log entry's position within the |
| log.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.Reader.html" title="class in org.apache.mesos">Log.Reader</a></strong></code> |
| <div class="block">Provides read access to the <a href="../../../org/apache/mesos/Log.html" title="class in org.apache.mesos"><code>Log</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.Writer.html" title="class in org.apache.mesos">Log.Writer</a></strong></code> |
| <div class="block">Provides write access to the <a href="../../../org/apache/mesos/Log.html" title="class in org.apache.mesos"><code>Log</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.WriterFailedException.html" title="class in org.apache.mesos">Log.WriterFailedException</a></strong></code> |
| <div class="block">An exception that gets thrown when a writer no longer has the |
| ability to perform operations (e.g., because it was superseded by |
| another writer).</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../org/apache/mesos/Log.html#Log(int,%20java.lang.String,%20java.util.Set)">Log</a></strong>(int quorum, |
| java.lang.String path, |
| java.util.Set<java.lang.String> pids)</code> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas via the set of process PIDs.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../org/apache/mesos/Log.html#Log(int,%20java.lang.String,%20java.lang.String,%20long,%20java.util.concurrent.TimeUnit,%20java.lang.String)">Log</a></strong>(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode)</code> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas associated with the specified ZooKeeper |
| servers, timeout, and znode (or Zookeeper name space).</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../org/apache/mesos/Log.html#Log(int,%20java.lang.String,%20java.lang.String,%20long,%20java.util.concurrent.TimeUnit,%20java.lang.String,%20java.lang.String,%20byte[])">Log</a></strong>(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode, |
| java.lang.String scheme, |
| byte[] credentials)</code> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas associated with the specified ZooKeeper |
| servers, timeout, and znode (or Zookeeper name space).</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="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>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.html#finalize()">finalize</a></strong>()</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.html#initialize(int,%20java.lang.String,%20java.util.Set)">initialize</a></strong>(int quorum, |
| java.lang.String path, |
| java.util.Set<java.lang.String> pids)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.html#initialize(int,%20java.lang.String,%20java.lang.String,%20long,%20java.util.concurrent.TimeUnit,%20java.lang.String)">initialize</a></strong>(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.html#initialize(int,%20java.lang.String,%20java.lang.String,%20long,%20java.util.concurrent.TimeUnit,%20java.lang.String,%20java.lang.String,%20byte[])">initialize</a></strong>(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode, |
| java.lang.String scheme, |
| byte[] credentials)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../org/apache/mesos/Log.Position.html" title="class in org.apache.mesos">Log.Position</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../org/apache/mesos/Log.html#position(byte[])">position</a></strong>(byte[] identity)</code> |
| <div class="block">Returns a position based off of the bytes recovered from |
| Position.identity().</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="Log(int, java.lang.String, java.util.Set)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>Log</h4> |
| <pre>public Log(int quorum, |
| java.lang.String path, |
| java.util.Set<java.lang.String> pids)</pre> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas via the set of process PIDs.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>quorum</code> - The quorum size.</dd><dd><code>path</code> - Path to the file backing this log.</dd><dd><code>pids</code> - PIDs of the replicas to coordinate with.</dd></dl> |
| </li> |
| </ul> |
| <a name="Log(int, java.lang.String, java.lang.String, long, java.util.concurrent.TimeUnit, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>Log</h4> |
| <pre>public Log(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode)</pre> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas associated with the specified ZooKeeper |
| servers, timeout, and znode (or Zookeeper name space).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>quorum</code> - The quorum size.</dd><dd><code>path</code> - Path to the file backing this log.</dd><dd><code>servers</code> - List of ZooKeeper servers (e.g., 'ip1:port1,ip2:port2').</dd><dd><code>timeout</code> - Max number of time units to wait before a |
| <code>TimeoutException</code>.</dd><dd><code>unit</code> - Type of time units used for the timeout, e.g. seconds, |
| minutes, etc.</dd><dd><code>znode</code> - Path to znode where "state" should be rooted.</dd></dl> |
| </li> |
| </ul> |
| <a name="Log(int, java.lang.String, java.lang.String, long, java.util.concurrent.TimeUnit, java.lang.String, java.lang.String, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Log</h4> |
| <pre>public Log(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode, |
| java.lang.String scheme, |
| byte[] credentials)</pre> |
| <div class="block">Creates a new replicated log that assumes the specified quorum |
| size, is backed by a file at the specified path, and coordiantes |
| with other replicas associated with the specified ZooKeeper |
| servers, timeout, and znode (or Zookeeper name space).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>quorum</code> - The quorum size.</dd><dd><code>path</code> - Path to the file backing this log.</dd><dd><code>servers</code> - Zookeper servers/connection string.</dd><dd><code>timeout</code> - Max number of time units to wait before a |
| <code>TimeoutException</code>.</dd><dd><code>unit</code> - Type of time units used for the timeout, e.g. seconds, |
| minutes, etc.</dd><dd><code>znode</code> - The Zookeeper name space.</dd><dd><code>scheme</code> - Authentication scheme (e.g., "digest").</dd><dd><code>credentials</code> - Authentication credentials (e.g., "user:pass").</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="position(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>position</h4> |
| <pre>public <a href="../../../org/apache/mesos/Log.Position.html" title="class in org.apache.mesos">Log.Position</a> position(byte[] identity)</pre> |
| <div class="block">Returns a position based off of the bytes recovered from |
| Position.identity().</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>identity</code> - Identity, in bytes, of the position.</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>The position.</dd></dl> |
| </li> |
| </ul> |
| <a name="initialize(int, java.lang.String, java.util.Set)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initialize</h4> |
| <pre>protected void initialize(int quorum, |
| java.lang.String path, |
| java.util.Set<java.lang.String> pids)</pre> |
| </li> |
| </ul> |
| <a name="initialize(int, java.lang.String, java.lang.String, long, java.util.concurrent.TimeUnit, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initialize</h4> |
| <pre>protected void initialize(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode)</pre> |
| </li> |
| </ul> |
| <a name="initialize(int, java.lang.String, java.lang.String, long, java.util.concurrent.TimeUnit, java.lang.String, java.lang.String, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initialize</h4> |
| <pre>protected void initialize(int quorum, |
| java.lang.String path, |
| java.lang.String servers, |
| long timeout, |
| java.util.concurrent.TimeUnit unit, |
| java.lang.String znode, |
| java.lang.String scheme, |
| byte[] credentials)</pre> |
| </li> |
| </ul> |
| <a name="finalize()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>finalize</h4> |
| <pre>protected void finalize()</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code>finalize</code> in class <code>java.lang.Object</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../org/apache/mesos/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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/mesos/ExecutorDriver.html" title="interface in org.apache.mesos"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../org/apache/mesos/Log.Entry.html" title="class in org.apache.mesos"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?org/apache/mesos/Log.html" target="_top">Frames</a></li> |
| <li><a href="Log.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><a href="#nested_class_summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |