| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>AsyncKuduSession (Kudu 1.0.1 API)</title> |
| <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="AsyncKuduSession (Kudu 1.0.1 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/AsyncKuduSession.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/kudu/client/AsyncKuduScanner.ReadMode.html" title="enum in org.apache.kudu.client"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/kudu/client/ColumnRangePredicate.html" title="class in org.apache.kudu.client"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/kudu/client/AsyncKuduSession.html" target="_top">Frames</a></li> |
| <li><a href="AsyncKuduSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.kudu.client</div> |
| <h2 title="Class AsyncKuduSession" class="title">Class AsyncKuduSession</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://docs.oracle.com/javase/7/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.kudu.client.AsyncKuduSession</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Unstable |
| <a href="http://docs.oracle.com/javase/7/docs/api/javax/annotation/concurrent.NotThreadSafe.html?is-external=true" title="class or interface in javax.annotation">@NotThreadSafe</a> |
| public class <span class="strong">AsyncKuduSession</span> |
| extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></pre> |
| <div class="block">A AsyncKuduSession belongs to a specific AsyncKuduClient, and represents a context in |
| which all read/write data access should take place. Within a session, |
| multiple operations may be accumulated and batched together for better |
| efficiency. Settings like timeouts, priorities, and trace IDs are also set |
| per session.<p> |
| |
| AsyncKuduSession is separate from KuduTable because a given batch or transaction |
| may span multiple tables. This is particularly important in the future when |
| we add ACID support, but even in the context of batching, we may be able to |
| coalesce writes to different tables hosted on the same server into the same |
| RPC.<p> |
| |
| AsyncKuduSession is separate from AsyncKuduClient because, in a multi-threaded |
| application, different threads may need to concurrently execute |
| transactions. Similar to a JDBC "session", transaction boundaries will be |
| delineated on a per-session basis -- in between a "BeginTransaction" and |
| "Commit" call on a given session, all operations will be part of the same |
| transaction. Meanwhile another concurrent Session object can safely run |
| non-transactional work or other transactions without interfering.<p> |
| |
| Therefore, this class is <b>not</b> thread-safe.<p> |
| |
| Additionally, there is a guarantee that writes from different sessions do not |
| get batched together into the same RPCs -- this means that latency-sensitive |
| clients can run through the same AsyncKuduClient object as throughput-oriented |
| clients, perhaps by setting the latency-sensitive session's timeouts low and |
| priorities high. Without the separation of batches, a latency-sensitive |
| single-row insert might get batched along with 10MB worth of inserts from the |
| batch writer, thus delaying the response significantly.<p> |
| |
| Though we currently do not have transactional support, users will be forced |
| to use a AsyncKuduSession to instantiate reads as well as writes. This will make |
| it more straight-forward to add RW transactions in the future without |
| significant modifications to the API.<p> |
| |
| Timeouts are handled differently depending on the flush mode. |
| With AUTO_FLUSH_SYNC, the timeout is set on each apply()'d operation. |
| With AUTO_FLUSH_BACKGROUND and MANUAL_FLUSH, the timeout is assigned to a whole batch of |
| operations upon flush()'ing. It means that in a situation with a timeout of 500ms and a flush |
| interval of 1000ms, an operation can be outstanding for up to 1500ms before being timed out.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested_class_summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested_classes_inherited_from_class_org.apache.kudu.client.SessionConfiguration"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface org.apache.kudu.client.<a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></h3> |
| <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.FlushMode.html" title="enum in org.apache.kudu.client">SessionConfiguration.FlushMode</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#LOG">LOG</a></strong></code> </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>com.stumbleupon.async.Deferred<<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#apply(org.apache.kudu.client.Operation)">apply</a></strong>(<a href="../../../../org/apache/kudu/client/Operation.html" title="class in org.apache.kudu.client">Operation</a> operation)</code> |
| <div class="block">Apply the given operation.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>com.stumbleupon.async.Deferred<<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#close()">close</a></strong>()</code> |
| <div class="block">Flushes the buffered operations and marks this session as closed.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#countPendingErrors()">countPendingErrors</a></strong>()</code> |
| <div class="block">Return the number of errors which are pending.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>com.stumbleupon.async.Deferred<<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#flush()">flush</a></strong>()</code> |
| <div class="block">Flush buffered writes.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.FlushMode.html" title="enum in org.apache.kudu.client">SessionConfiguration.FlushMode</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#getFlushMode()">getFlushMode</a></strong>()</code> |
| <div class="block">Get the current flush mode.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/kudu/client/RowErrorsAndOverflowStatus.html" title="class in org.apache.kudu.client">RowErrorsAndOverflowStatus</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#getPendingErrors()">getPendingErrors</a></strong>()</code> |
| <div class="block">Return any errors from previous calls.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#getTimeoutMillis()">getTimeoutMillis</a></strong>()</code> |
| <div class="block">Get the current timeout.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#hasPendingOperations()">hasPendingOperations</a></strong>()</code> |
| <div class="block">Check if there are operations that haven't been completely applied.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#isClosed()">isClosed</a></strong>()</code> |
| <div class="block">Returns true if this session has already been closed.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#isIgnoreAllDuplicateRows()">isIgnoreAllDuplicateRows</a></strong>()</code> |
| <div class="block">Tells if the session is currently ignoring row errors when the whole list returned by a tablet |
| server is of the AlreadyPresent type.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setExternalConsistencyMode(org.apache.kudu.client.ExternalConsistencyMode)">setExternalConsistencyMode</a></strong>(<a href="../../../../org/apache/kudu/client/ExternalConsistencyMode.html" title="enum in org.apache.kudu.client">ExternalConsistencyMode</a> consistencyMode)</code> |
| <div class="block">Set the new external consistency mode for this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setFlushInterval(int)">setFlushInterval</a></strong>(int interval)</code> |
| <div class="block">Set the flush interval, which will be used for the next scheduling decision.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setFlushMode(org.apache.kudu.client.SessionConfiguration.FlushMode)">setFlushMode</a></strong>(<a href="../../../../org/apache/kudu/client/SessionConfiguration.FlushMode.html" title="enum in org.apache.kudu.client">SessionConfiguration.FlushMode</a> flushMode)</code> |
| <div class="block">Set the new flush mode for this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setIgnoreAllDuplicateRows(boolean)">setIgnoreAllDuplicateRows</a></strong>(boolean ignoreAllDuplicateRows)</code> |
| <div class="block">Configures the option to ignore all the row errors if they are all of the AlreadyPresent type.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setMutationBufferLowWatermark(float)">setMutationBufferLowWatermark</a></strong>(float mutationBufferLowWatermarkPercentage)</code> |
| <div class="block">Set the low watermark for this session.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setMutationBufferSpace(int)">setMutationBufferSpace</a></strong>(int size)</code> |
| <div class="block">Set the number of operations that can be buffered.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#setTimeoutMillis(long)">setTimeoutMillis</a></strong>(long timeout)</code> |
| <div class="block">Sets the timeout for the next applied operations.</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://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/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://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/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"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field_detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="LOG"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>LOG</h4> |
| <pre>public static final org.slf4j.Logger LOG</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getFlushMode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFlushMode</h4> |
| <pre>public <a href="../../../../org/apache/kudu/client/SessionConfiguration.FlushMode.html" title="enum in org.apache.kudu.client">SessionConfiguration.FlushMode</a> getFlushMode()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getFlushMode()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Get the current flush mode.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getFlushMode()">getFlushMode</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>flush mode, AUTO_FLUSH_SYNC by default</dd></dl> |
| </li> |
| </ul> |
| <a name="setFlushMode(org.apache.kudu.client.SessionConfiguration.FlushMode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFlushMode</h4> |
| <pre>public void setFlushMode(<a href="../../../../org/apache/kudu/client/SessionConfiguration.FlushMode.html" title="enum in org.apache.kudu.client">SessionConfiguration.FlushMode</a> flushMode)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setFlushMode(org.apache.kudu.client.SessionConfiguration.FlushMode)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Set the new flush mode for this session.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setFlushMode(org.apache.kudu.client.SessionConfiguration.FlushMode)">setFlushMode</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>flushMode</code> - new flush mode, can be the same as the previous one.</dd></dl> |
| </li> |
| </ul> |
| <a name="setExternalConsistencyMode(org.apache.kudu.client.ExternalConsistencyMode)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setExternalConsistencyMode</h4> |
| <pre>public void setExternalConsistencyMode(<a href="../../../../org/apache/kudu/client/ExternalConsistencyMode.html" title="enum in org.apache.kudu.client">ExternalConsistencyMode</a> consistencyMode)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setExternalConsistencyMode(org.apache.kudu.client.ExternalConsistencyMode)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Set the new external consistency mode for this session.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setExternalConsistencyMode(org.apache.kudu.client.ExternalConsistencyMode)">setExternalConsistencyMode</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>consistencyMode</code> - new external consistency mode, can the same as the previous one.</dd></dl> |
| </li> |
| </ul> |
| <a name="setMutationBufferSpace(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMutationBufferSpace</h4> |
| <pre>public void setMutationBufferSpace(int size)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setMutationBufferSpace(int)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Set the number of operations that can be buffered.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setMutationBufferSpace(int)">setMutationBufferSpace</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>size</code> - number of ops.</dd></dl> |
| </li> |
| </ul> |
| <a name="setMutationBufferLowWatermark(float)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setMutationBufferLowWatermark</h4> |
| <pre>public void setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setMutationBufferLowWatermark(float)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Set the low watermark for this session. The default is set to half the mutation buffer space. |
| For example, a buffer space of 1000 with a low watermark set to 50% (0.5) will start randomly |
| sending PleaseRetryExceptions once there's an outstanding flush and the buffer is over 500. |
| As the buffer gets fuller, it becomes likelier to hit the exception.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setMutationBufferLowWatermark(float)">setMutationBufferLowWatermark</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>mutationBufferLowWatermarkPercentage</code> - a new low watermark as a percentage, |
| has to be between 0 and 1 (inclusive). A value of 1 disables |
| the low watermark since it's the same as the high one</dd></dl> |
| </li> |
| </ul> |
| <a name="setFlushInterval(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFlushInterval</h4> |
| <pre>public void setFlushInterval(int interval)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setFlushInterval(int)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Set the flush interval, which will be used for the next scheduling decision.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setFlushInterval(int)">setFlushInterval</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>interval</code> - interval in milliseconds.</dd></dl> |
| </li> |
| </ul> |
| <a name="setTimeoutMillis(long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setTimeoutMillis</h4> |
| <pre>public void setTimeoutMillis(long timeout)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setTimeoutMillis(long)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Sets the timeout for the next applied operations. |
| The default timeout is 0, which disables the timeout functionality.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setTimeoutMillis(long)">setTimeoutMillis</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - Timeout in milliseconds.</dd></dl> |
| </li> |
| </ul> |
| <a name="getTimeoutMillis()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTimeoutMillis</h4> |
| <pre>public long getTimeoutMillis()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getTimeoutMillis()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Get the current timeout.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getTimeoutMillis()">getTimeoutMillis</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>operation timeout in milliseconds, 0 if none was configured.</dd></dl> |
| </li> |
| </ul> |
| <a name="isClosed()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isClosed</h4> |
| <pre>public boolean isClosed()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#isClosed()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Returns true if this session has already been closed.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#isClosed()">isClosed</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isIgnoreAllDuplicateRows()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isIgnoreAllDuplicateRows</h4> |
| <pre>public boolean isIgnoreAllDuplicateRows()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#isIgnoreAllDuplicateRows()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Tells if the session is currently ignoring row errors when the whole list returned by a tablet |
| server is of the AlreadyPresent type.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#isIgnoreAllDuplicateRows()">isIgnoreAllDuplicateRows</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>true if the session is enforcing this, else false</dd></dl> |
| </li> |
| </ul> |
| <a name="setIgnoreAllDuplicateRows(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setIgnoreAllDuplicateRows</h4> |
| <pre>public void setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setIgnoreAllDuplicateRows(boolean)">SessionConfiguration</a></code></strong></div> |
| <div class="block">Configures the option to ignore all the row errors if they are all of the AlreadyPresent type. |
| This can be needed when facing KUDU-568. The effect of enabling this is that operation |
| responses that match this pattern will be cleared of their row errors, meaning that we consider |
| them successful. |
| This is disabled by default.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#setIgnoreAllDuplicateRows(boolean)">setIgnoreAllDuplicateRows</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Parameters:</span></dt><dd><code>ignoreAllDuplicateRows</code> - true if this session should enforce this, else false</dd></dl> |
| </li> |
| </ul> |
| <a name="countPendingErrors()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>countPendingErrors</h4> |
| <pre>public int countPendingErrors()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#countPendingErrors()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Return the number of errors which are pending. Errors may accumulate when |
| using the AUTO_FLUSH_BACKGROUND mode.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#countPendingErrors()">countPendingErrors</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a count of errors</dd></dl> |
| </li> |
| </ul> |
| <a name="getPendingErrors()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPendingErrors</h4> |
| <pre>public <a href="../../../../org/apache/kudu/client/RowErrorsAndOverflowStatus.html" title="class in org.apache.kudu.client">RowErrorsAndOverflowStatus</a> getPendingErrors()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getPendingErrors()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Return any errors from previous calls. If there were more errors |
| than could be held in the session's error storage, the overflow state is set to true. |
| Resets the pending errors.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#getPendingErrors()">getPendingErrors</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>an object that contains the errors and the overflow status</dd></dl> |
| </li> |
| </ul> |
| <a name="close()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>close</h4> |
| <pre>public com.stumbleupon.async.Deferred<<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>>> close()</pre> |
| <div class="block">Flushes the buffered operations and marks this session as closed. |
| See the javadoc on <a href="../../../../org/apache/kudu/client/AsyncKuduSession.html#flush()"><code>flush()</code></a> on how to deal with exceptions coming out of this method.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a Deferred whose callback chain will be invoked when. |
| everything that was buffered at the time of the call has been flushed.</dd></dl> |
| </li> |
| </ul> |
| <a name="flush()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>flush</h4> |
| <pre>public com.stumbleupon.async.Deferred<<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>>> flush()</pre> |
| <div class="block">Flush buffered writes.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a <code>Deferred</code> whose callback chain will be invoked when all applied operations at |
| the time of the call have been flushed.</dd></dl> |
| </li> |
| </ul> |
| <a name="hasPendingOperations()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasPendingOperations</h4> |
| <pre>public boolean hasPendingOperations()</pre> |
| <div class="block"><strong>Description copied from interface: <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#hasPendingOperations()">SessionConfiguration</a></code></strong></div> |
| <div class="block">Check if there are operations that haven't been completely applied.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html#hasPendingOperations()">hasPendingOperations</a></code> in interface <code><a href="../../../../org/apache/kudu/client/SessionConfiguration.html" title="interface in org.apache.kudu.client">SessionConfiguration</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>true if operations are pending, else false.</dd></dl> |
| </li> |
| </ul> |
| <a name="apply(org.apache.kudu.client.Operation)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>apply</h4> |
| <pre>public com.stumbleupon.async.Deferred<<a href="../../../../org/apache/kudu/client/OperationResponse.html" title="class in org.apache.kudu.client">OperationResponse</a>> apply(<a href="../../../../org/apache/kudu/client/Operation.html" title="class in org.apache.kudu.client">Operation</a> operation) |
| throws <a href="../../../../org/apache/kudu/client/KuduException.html" title="class in org.apache.kudu.client">KuduException</a></pre> |
| <div class="block">Apply the given operation. |
| The behavior of this function depends on the current flush mode. Regardless |
| of flush mode, however, Apply may begin to perform processing in the background |
| for the call (e.g looking up the tablet, etc).</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>operation</code> - operation to apply</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>a Deferred to track this operation</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/kudu/client/KuduException.html" title="class in org.apache.kudu.client">KuduException</a></code> - if an error happens or <a href="../../../../org/apache/kudu/client/PleaseThrottleException.html" title="class in org.apache.kudu.client"><code>PleaseThrottleException</code></a> is triggered</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/AsyncKuduSession.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/kudu/client/AsyncKuduScanner.ReadMode.html" title="enum in org.apache.kudu.client"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/kudu/client/ColumnRangePredicate.html" title="class in org.apache.kudu.client"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/kudu/client/AsyncKuduSession.html" target="_top">Frames</a></li> |
| <li><a href="AsyncKuduSession.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field_summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field_detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |