Added: bookkeeper/site/trunk/content/docs/r4.4.0/apidocs/org/apache/bookkeeper/client/BookKeeper.html URL: http://svn.apache.org/viewvc/bookkeeper/site/trunk/content/docs/r4.4.0/apidocs/org/apache/bookkeeper/client/BookKeeper.html?rev=1743979&view=auto ============================================================================== --- bookkeeper/site/trunk/content/docs/r4.4.0/apidocs/org/apache/bookkeeper/client/BookKeeper.html (added) +++ bookkeeper/site/trunk/content/docs/r4.4.0/apidocs/org/apache/bookkeeper/client/BookKeeper.html Sun May 15 21:38:37 2016 @@ -0,0 +1,900 @@ +<!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 (version 1.7.0_80) on Sun May 15 21:18:06 UTC 2016 --> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>BookKeeper (bookkeeper 4.4.0 API)</title> +<meta name="date" content="2016-05-15"> +<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="BookKeeper (bookkeeper 4.4.0 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/BookKeeper.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/bookkeeper/client/BookiesListener.html" title="interface in org.apache.bookkeeper.client"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/bookkeeper/client/BookKeeper.Builder.html" title="class in org.apache.bookkeeper.client"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/bookkeeper/client/BookKeeper.html" target="_top">Frames</a></li> +<li><a href="BookKeeper.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.bookkeeper.client</div> +<h2 title="Class BookKeeper" class="title">Class BookKeeper</h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li><a href="http://download.oracle.com/javase/6/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>org.apache.bookkeeper.client.BookKeeper</li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Implemented Interfaces:</dt> +<dd><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd> +</dl> +<hr> +<br> +<pre>public class <span class="strong">BookKeeper</span> +extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> +implements <a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></pre> +<div class="block">BookKeeper client. We assume there is one single writer to a ledger at any + time. + + There are four possible operations: start a new ledger, write to a ledger, + read from a ledger and delete a ledger. + + The exceptions resulting from synchronous calls and error code resulting from + asynchronous calls can be found in the class <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client"><code>BKException</code></a>.</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/bookkeeper/client/BookKeeper.Builder.html" title="class in org.apache.bookkeeper.client">BookKeeper.Builder</a></strong></code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a></strong></code> +<div class="block">There are 2 digest types that can be used for verification.</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/bookkeeper/client/BookKeeper.html#BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration)">BookKeeper</a></strong>(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf)</code> +<div class="block">Create a bookkeeper client using a configuration object.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration,%20org.apache.zookeeper.ZooKeeper)">BookKeeper</a></strong>(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf, + org.apache.zookeeper.ZooKeeper zk)</code> +<div class="block">Create a bookkeeper client but use the passed in zookeeper client instead + of instantiating one.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colOne"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration,%20org.apache.zookeeper.ZooKeeper,%20org.jboss.netty.channel.socket.ClientSocketChannelFactory)">BookKeeper</a></strong>(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf, + org.apache.zookeeper.ZooKeeper zk, + org.jboss.netty.channel.socket.ClientSocketChannelFactory channelFactory)</code> +<div class="block">Create a bookkeeper client but use the passed in zookeeper client and + client socket channel factory instead of instantiating those.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colOne"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#BookKeeper(java.lang.String)">BookKeeper</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> servers)</code> +<div class="block">Create a bookkeeper client.</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>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)">asyncCreateLedger</a></strong>(int ensSize, + int writeQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Creates a new ledger asynchronously.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)">asyncCreateLedger</a></strong>(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Creates a new ledger asynchronously.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedgerAdv(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)">asyncCreateLedgerAdv</a></strong>(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Creates a new ledger asynchronously and returns <a href="../../../../org/apache/bookkeeper/client/LedgerHandleAdv.html" title="class in org.apache.bookkeeper.client"><code>LedgerHandleAdv</code></a> + which can accept entryId.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncDeleteLedger(long,%20org.apache.bookkeeper.client.AsyncCallback.DeleteCallback,%20java.lang.Object)">asyncDeleteLedger</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.DeleteCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.DeleteCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Deletes a ledger asynchronously.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncIsClosed(long,%20org.apache.bookkeeper.client.AsyncCallback.IsClosedCallback,%20java.lang.Object)">asyncIsClosed</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.IsClosedCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.IsClosedCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Check asynchronously whether the ledger with identifier <i>lId</i> + has been closed.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncOpenLedger(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.OpenCallback,%20java.lang.Object)">asyncOpenLedger</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.OpenCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.OpenCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Open existing ledger asynchronously for reading.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncOpenLedgerNoRecovery(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.OpenCallback,%20java.lang.Object)">asyncOpenLedgerNoRecovery</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.OpenCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.OpenCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</code> +<div class="block">Open existing ledger asynchronously for reading, but it does not try to + recover the ledger if it is not yet closed.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#close()">close</a></strong>()</code> +<div class="block">Shuts down client.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#createLedger(org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">createLedger</a></strong>(<a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Creates a new ledger.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#createLedger(int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">createLedger</a></strong>(int ensSize, + int qSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Synchronous call to create ledger.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#createLedger(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">createLedger</a></strong>(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Synchronous call to create ledger.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#createLedgerAdv(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">createLedgerAdv</a></strong>(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Synchronous call to create ledger.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#deleteLedger(long)">deleteLedger</a></strong>(long lId)</code> +<div class="block">Synchronous call to delete a ledger.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>static <a href="../../../../org/apache/bookkeeper/client/BookKeeper.Builder.html" title="class in org.apache.bookkeeper.client">BookKeeper.Builder</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#forConfig(org.apache.bookkeeper.conf.ClientConfiguration)">forConfig</a></strong>(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf)</code> </td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#getConf()">getConf</a></strong>()</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#isClosed(long)">isClosed</a></strong>(long lId)</code> +<div class="block">Check whether the ledger with identifier <i>lId</i> + has been closed.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#openLedger(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">openLedger</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Synchronous open ledger call</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a></code></td> +<td class="colLast"><code><strong><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#openLedgerNoRecovery(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[])">openLedgerNoRecovery</a></strong>(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd)</code> +<div class="block">Synchronous, unsafe open ledger call</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.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> +<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com /javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" 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="BookKeeper(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BookKeeper</h4> +<pre>public BookKeeper(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> servers) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + org.apache.zookeeper.KeeperException</pre> +<div class="block">Create a bookkeeper client. A zookeeper client and a client socket factory + will be instantiated as part of this constructor.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>servers</code> - A list of one of more servers on which zookeeper is running. The + client assumes that the running bookies have been registered with + zookeeper under the path + <code>BookieWatcher.bookieRegistrationPath</code></dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code>org.apache.zookeeper.KeeperException</code></dd></dl> +</li> +</ul> +<a name="BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BookKeeper</h4> +<pre>public BookKeeper(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + org.apache.zookeeper.KeeperException</pre> +<div class="block">Create a bookkeeper client using a configuration object. + A zookeeper client and a client socket factory will be + instantiated as part of this constructor.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conf</code> - Client Configuration object</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code>org.apache.zookeeper.KeeperException</code></dd></dl> +</li> +</ul> +<a name="BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration, org.apache.zookeeper.ZooKeeper)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>BookKeeper</h4> +<pre>public BookKeeper(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf, + org.apache.zookeeper.ZooKeeper zk) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + org.apache.zookeeper.KeeperException</pre> +<div class="block">Create a bookkeeper client but use the passed in zookeeper client instead + of instantiating one.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conf</code> - Client Configuration object + <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf"><code>ClientConfiguration</code></a></dd><dd><code>zk</code> - Zookeeper client instance connected to the zookeeper with which + the bookies have registered</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code>org.apache.zookeeper.KeeperException</code></dd></dl> +</li> +</ul> +<a name="BookKeeper(org.apache.bookkeeper.conf.ClientConfiguration, org.apache.zookeeper.ZooKeeper, org.jboss.netty.channel.socket.ClientSocketChannelFactory)"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>BookKeeper</h4> +<pre>public BookKeeper(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf, + org.apache.zookeeper.ZooKeeper zk, + org.jboss.netty.channel.socket.ClientSocketChannelFactory channelFactory) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + org.apache.zookeeper.KeeperException</pre> +<div class="block">Create a bookkeeper client but use the passed in zookeeper client and + client socket channel factory instead of instantiating those.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>conf</code> - Client Configuration Object + <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf"><code>ClientConfiguration</code></a></dd><dd><code>zk</code> - Zookeeper client instance connected to the zookeeper with which + the bookies have registered. The ZooKeeper client must be connected + before it is passed to BookKeeper. Otherwise a KeeperException is thrown.</dd><dd><code>channelFactory</code> - A factory that will be used to create connections to the bookies</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code>org.apache.zookeeper.KeeperException</code> - if the passed zk handle is not connected</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="forConfig(org.apache.bookkeeper.conf.ClientConfiguration)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>forConfig</h4> +<pre>public static <a href="../../../../org/apache/bookkeeper/client/BookKeeper.Builder.html" title="class in org.apache.bookkeeper.client">BookKeeper.Builder</a> forConfig(<a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> conf)</pre> +</li> +</ul> +<a name="getConf()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getConf</h4> +<pre>protected <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html" title="class in org.apache.bookkeeper.conf">ClientConfiguration</a> getConf()</pre> +</li> +</ul> +<a name="asyncCreateLedger(int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.CreateCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncCreateLedger</h4> +<pre>public void asyncCreateLedger(int ensSize, + int writeQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Creates a new ledger asynchronously. To create a ledger, we need to specify + the ensemble size, the quorum size, the digest type, a password, a callback + implementation, and an optional control object. The ensemble size is how + many bookies the entries should be striped among and the quorum size is the + degree of replication of each entry. The digest type is either a MAC or a + CRC. Note that the CRC option is not able to protect a client against a + bookie that replaces an entry. The password is used not only to + authenticate access to a ledger, but also to verify entries in ledgers.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - number of bookies over which to stripe entries</dd><dd><code>writeQuorumSize</code> - number of bookies each entry will be written to. each of these bookies + must acknowledge the entry before the call is completed.</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd><dd><code>cb</code> - createCallback implementation</dd><dd><code>ctx</code> - optional control object</dd></dl> +</li> +</ul> +<a name="asyncCreateLedger(int, int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.CreateCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncCreateLedger</h4> +<pre>public void asyncCreateLedger(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Creates a new ledger asynchronously. Ledgers created with this call have + a separate write quorum and ack quorum size. The write quorum must be larger than + the ack quorum. + + Separating the write and the ack quorum allows the BookKeeper client to continue + writing when a bookie has failed but the failure has not yet been detected. Detecting + a bookie has failed can take a number of seconds, as configured by the read timeout + <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html#getReadTimeout()"><code>ClientConfiguration.getReadTimeout()</code></a>. Once the bookie failure is detected, + that bookie will be removed from the ensemble. + + The other parameters match those of <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)"><code>asyncCreateLedger(int, int, DigestType, byte[], + AsyncCallback.CreateCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - number of bookies over which to stripe entries</dd><dd><code>writeQuorumSize</code> - number of bookies each entry will be written to</dd><dd><code>ackQuorumSize</code> - number of bookies which must acknowledge an entry before the call is completed</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd><dd><code>cb</code> - createCallback implementation</dd><dd><code>ctx</code> - optional control object</dd></dl> +</li> +</ul> +<a name="createLedger(org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>createLedger</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> createLedger(<a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> +<div class="block">Creates a new ledger. Default of 3 servers, and quorum of 2 servers.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the newly created ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +<a name="createLedger(int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>createLedger</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> createLedger(int ensSize, + int qSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></pre> +<div class="block">Synchronous call to create ledger. Parameters match those of + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)"><code>asyncCreateLedger(int, int, DigestType, byte[], + AsyncCallback.CreateCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - </dd><dd><code>qSize</code> - </dd><dd><code>digestType</code> - </dd><dd><code>passwd</code> - </dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the newly created ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +<a name="createLedger(int, int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>createLedger</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> createLedger(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></pre> +<div class="block">Synchronous call to create ledger. Parameters match those of + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)"><code>asyncCreateLedger(int, int, int, DigestType, byte[], + AsyncCallback.CreateCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - </dd><dd><code>writeQuorumSize</code> - </dd><dd><code>ackQuorumSize</code> - </dd><dd><code>digestType</code> - </dd><dd><code>passwd</code> - </dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the newly created ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +<a name="createLedgerAdv(int, int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>createLedgerAdv</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> createLedgerAdv(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></pre> +<div class="block">Synchronous call to create ledger. + Creates a new ledger asynchronously and returns <a href="../../../../org/apache/bookkeeper/client/LedgerHandleAdv.html" title="class in org.apache.bookkeeper.client"><code>LedgerHandleAdv</code></a> which can accept entryId. + Parameters must match those of + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedgerAdv(int,%20int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)"><code>asyncCreateLedgerAdv(int, int, int, DigestType, byte[], + AsyncCallback.CreateCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - </dd><dd><code>writeQuorumSize</code> - </dd><dd><code>ackQuorumSize</code> - </dd><dd><code>digestType</code> - </dd><dd><code>passwd</code> - </dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the newly created ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +<a name="asyncCreateLedgerAdv(int, int, int, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.CreateCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncCreateLedgerAdv</h4> +<pre>public void asyncCreateLedgerAdv(int ensSize, + int writeQuorumSize, + int ackQuorumSize, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.CreateCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.CreateCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Creates a new ledger asynchronously and returns <a href="../../../../org/apache/bookkeeper/client/LedgerHandleAdv.html" title="class in org.apache.bookkeeper.client"><code>LedgerHandleAdv</code></a> + which can accept entryId. Ledgers created with this call have ability to accept + a separate write quorum and ack quorum size. The write quorum must be larger than + the ack quorum. + + Separating the write and the ack quorum allows the BookKeeper client to continue + writing when a bookie has failed but the failure has not yet been detected. Detecting + a bookie has failed can take a number of seconds, as configured by the read timeout + <a href="../../../../org/apache/bookkeeper/conf/ClientConfiguration.html#getReadTimeout()"><code>ClientConfiguration.getReadTimeout()</code></a>. Once the bookie failure is detected, + that bookie will be removed from the ensemble. + + The other parameters match those of <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncCreateLedger(int,%20int,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.CreateCallback,%20java.lang.Object)"><code>asyncCreateLedger(int, int, DigestType, byte[], + AsyncCallback.CreateCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ensSize</code> - number of bookies over which to stripe entries</dd><dd><code>writeQuorumSize</code> - number of bookies each entry will be written to</dd><dd><code>ackQuorumSize</code> - number of bookies which must acknowledge an entry before the call is completed</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd><dd><code>cb</code> - createCallback implementation</dd><dd><code>ctx</code> - optional control object</dd></dl> +</li> +</ul> +<a name="asyncOpenLedger(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.OpenCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncOpenLedger</h4> +<pre>public void asyncOpenLedger(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.OpenCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.OpenCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Open existing ledger asynchronously for reading. + + Opening a ledger with this method invokes fencing and recovery on the ledger + if the ledger has not been closed. Fencing will block all other clients from + writing to the ledger. Recovery will make sure that the ledger is closed + before reading from it. + + Recovery also makes sure that any entries which reached one bookie, but not a + quorum, will be replicated to a quorum of bookies. This occurs in cases were + the writer of a ledger crashes after sending a write request to one bookie but + before being able to send it to the rest of the bookies in the quorum. + + If the ledger is already closed, neither fencing nor recovery will be applied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger identifier</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd><dd><code>ctx</code> - optional control object</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html#asyncClose(org.apache.bookkeeper.client.AsyncCallback.CloseCallback,%20java.lang.Object)"><code>LedgerHandle.asyncClose(org.apache.bookkeeper.client.AsyncCallback.CloseCallback, java.lang.Object)</code></a></dd></dl> +</li> +</ul> +<a name="asyncOpenLedgerNoRecovery(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.OpenCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncOpenLedgerNoRecovery</h4> +<pre>public void asyncOpenLedgerNoRecovery(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.OpenCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.OpenCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Open existing ledger asynchronously for reading, but it does not try to + recover the ledger if it is not yet closed. The application needs to use + it carefully, since the writer might have crashed and ledger will remain + unsealed forever if there is no external mechanism to detect the failure + of the writer and the ledger is not open in a safe manner, invoking the + recovery procedure. + + Opening a ledger without recovery does not fence the ledger. As such, other + clients can continue to write to the ledger. + + This method returns a read only ledger handle. It will not be possible + to add entries to the ledger. Any attempt to add entries will throw an + exception. + + Reads from the returned ledger will only be able to read entries up until + the lastConfirmedEntry at the point in time at which the ledger was opened.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger identifier</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd><dd><code>ctx</code> - optional control object</dd></dl> +</li> +</ul> +<a name="openLedger(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>openLedger</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> openLedger(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> +<div class="block">Synchronous open ledger call</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger identifier</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the open ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncOpenLedger(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.OpenCallback,%20java.lang.Object)"><code>asyncOpenLedger(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.OpenCallback, java.lang.Object)</code></a></dd></dl> +</li> +</ul> +<a name="openLedgerNoRecovery(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>openLedgerNoRecovery</h4> +<pre>public <a href="../../../../org/apache/bookkeeper/client/LedgerHandle.html" title="class in org.apache.bookkeeper.client">LedgerHandle</a> openLedgerNoRecovery(long lId, + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.DigestType.html" title="enum in org.apache.bookkeeper.client">BookKeeper.DigestType</a> digestType, + byte[] passwd) + throws <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> +<div class="block">Synchronous, unsafe open ledger call</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger identifier</dd><dd><code>digestType</code> - digest type, either MAC or CRC32</dd><dd><code>passwd</code> - password</dd> +<dt><span class="strong">Returns:</span></dt><dd>a handle to the open ledger</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncOpenLedgerNoRecovery(long,%20org.apache.bookkeeper.client.BookKeeper.DigestType,%20byte[],%20org.apache.bookkeeper.client.AsyncCallback.OpenCallback,%20java.lang.Object)"><code>asyncOpenLedgerNoRecovery(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[], org.apache.bookkeeper.client.AsyncCallback.OpenCallback, java.lang.Object)</code></a></dd></dl> +</li> +</ul> +<a name="asyncDeleteLedger(long, org.apache.bookkeeper.client.AsyncCallback.DeleteCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncDeleteLedger</h4> +<pre>public void asyncDeleteLedger(long lId, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.DeleteCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.DeleteCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Deletes a ledger asynchronously.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger Id</dd><dd><code>cb</code> - deleteCallback implementation</dd><dd><code>ctx</code> - optional control object</dd></dl> +</li> +</ul> +<a name="deleteLedger(long)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>deleteLedger</h4> +<pre>public void deleteLedger(long lId) + throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></pre> +<div class="block">Synchronous call to delete a ledger. Parameters match those of + <a href="../../../../org/apache/bookkeeper/client/BookKeeper.html#asyncDeleteLedger(long,%20org.apache.bookkeeper.client.AsyncCallback.DeleteCallback,%20java.lang.Object)"><code>asyncDeleteLedger(long, AsyncCallback.DeleteCallback, Object)</code></a></div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledgerId</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.BKNoSuchLedgerExistsException.html" title="class in org.apache.bookkeeper.client">BKException.BKNoSuchLedgerExistsException</a></code> - if the ledger doesn't exist</dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +<a name="asyncIsClosed(long, org.apache.bookkeeper.client.AsyncCallback.IsClosedCallback, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>asyncIsClosed</h4> +<pre>public void asyncIsClosed(long lId, + <a href="../../../../org/apache/bookkeeper/client/AsyncCallback.IsClosedCallback.html" title="interface in org.apache.bookkeeper.client">AsyncCallback.IsClosedCallback</a> cb, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> ctx)</pre> +<div class="block">Check asynchronously whether the ledger with identifier <i>lId</i> + has been closed.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - ledger identifier</dd><dd><code>cb</code> - callback method</dd></dl> +</li> +</ul> +<a name="isClosed(long)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isClosed</h4> +<pre>public boolean isClosed(long lId) + throws <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a>, + <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></pre> +<div class="block">Check whether the ledger with identifier <i>lId</i> + has been closed.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lId</code> - </dd> +<dt><span class="strong">Returns:</span></dt><dd>boolean true if ledger has been closed</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd></dl> +</li> +</ul> +<a name="close()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>close</h4> +<pre>public void close() + throws <a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>, + <a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></pre> +<div class="block">Shuts down client.</div> +<dl> +<dt><strong>Specified by:</strong></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code> in interface <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code></dd> +<dd><code><a href="../../../../org/apache/bookkeeper/client/BKException.html" title="class in org.apache.bookkeeper.client">BKException</a></code></dd></dl> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar_bottom"> +<!-- --> +</a><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/BookKeeper.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/bookkeeper/client/BookiesListener.html" title="interface in org.apache.bookkeeper.client"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../../org/apache/bookkeeper/client/BookKeeper.Builder.html" title="class in org.apache.bookkeeper.client"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../../index.html?org/apache/bookkeeper/client/BookKeeper.html" target="_top">Frames</a></li> +<li><a href="BookKeeper.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 ======= --> +<p class="legalCopy"><small>Copyright © 2011-2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> +</body> +</html>
