| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>DefaultPushErrorHandler</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="DefaultPushErrorHandler"; |
| } |
| //--> |
| </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="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="../../../../com/google/enterprise/adaptor/DefaultGetDocIdsErrorHandler.html" title="class in com.google.enterprise.adaptor"><span class="strong">PREV CLASS</span></a></li> |
| <li><a href="../../../../com/google/enterprise/adaptor/DocId.html" title="class in com.google.enterprise.adaptor"><span class="strong">NEXT CLASS</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?com/google/enterprise/adaptor/DefaultPushErrorHandler.html" target="_top">FRAMES</a></li> |
| <li><a href="DefaultPushErrorHandler.html" target="_top">NO FRAMES</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>SUMMARY: </li> |
| <li>NESTED | </li> |
| <li>FIELD | </li> |
| <li><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"> |
| <p class="subTitle">com.google.enterprise.adaptor</p> |
| <h2 title="Class DefaultPushErrorHandler" class="title">Class DefaultPushErrorHandler</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>com.google.enterprise.adaptor.DefaultPushErrorHandler</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html" title="interface in com.google.enterprise.adaptor">PushErrorHandler</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <strong>DefaultPushErrorHandler</strong> |
| 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="../../../../com/google/enterprise/adaptor/PushErrorHandler.html" title="interface in com.google.enterprise.adaptor">PushErrorHandler</a></pre> |
| <div class="block">Default handler of errors during a push of <code>DocId</code>s to the GSA.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== 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="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#DefaultPushErrorHandler()">DefaultPushErrorHandler</a></strong>()</code> |
| <div class="block">Same as <code>DefaultPushErrorHandler(12, 5000)</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#DefaultPushErrorHandler(int, long)">DefaultPushErrorHandler</a></strong>(int maximumTries, |
| long sleepTimeMillis)</code> |
| <div class="block">Create a default error handler that gives up after <code>maximumTries</code> and |
| sleeps <code>sleepTimeMillis * numberOfTries</code> before retrying.</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>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleFailedReadingReply(java.lang.Exception, int)">handleFailedReadingReply</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries)</code> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had reading the GSA's response.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleFailedToConnect(java.lang.Exception, int)">handleFailedToConnect</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries)</code> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had connecting with the GSA to |
| send a batch.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleFailedWriting(java.lang.Exception, int)">handleFailedWriting</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries)</code> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had writing to the GSA while |
| sending a batch.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleGeneric(java.lang.Exception, int)">handleGeneric</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries)</code> |
| <div class="block">Common handle method for generic error handling.</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, int)" 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="DefaultPushErrorHandler()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>DefaultPushErrorHandler</h4> |
| <pre>public DefaultPushErrorHandler()</pre> |
| <div class="block">Same as <code>DefaultPushErrorHandler(12, 5000)</code>.</div> |
| <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#DefaultPushErrorHandler(int, long)"><code>DefaultPushErrorHandler(int, long)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="DefaultPushErrorHandler(int, long)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DefaultPushErrorHandler</h4> |
| <pre>public DefaultPushErrorHandler(int maximumTries, |
| long sleepTimeMillis)</pre> |
| <div class="block">Create a default error handler that gives up after <code>maximumTries</code> and |
| sleeps <code>sleepTimeMillis * numberOfTries</code> before retrying.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="handleFailedToConnect(java.lang.Exception, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>handleFailedToConnect</h4> |
| <pre>public boolean handleFailedToConnect(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries) |
| 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></pre> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had connecting with the GSA to |
| send a batch. This includes determining if the operation should be retried |
| or if it should be aborted while also allowing other logic, like running |
| <code>Thread.sleep()</code> to permit time for the situation to improve. The |
| thrown exception is provided as well as the number of times that this batch |
| was attempted to be sent. |
| |
| <p>By default, calls <a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleGeneric(java.lang.Exception, int)"><code>handleGeneric(java.lang.Exception, int)</code></a>.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html#handleFailedToConnect(java.lang.Exception, int)">handleFailedToConnect</a></code> in interface <code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html" title="interface in com.google.enterprise.adaptor">PushErrorHandler</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> to indicate the batch should be resent, |
| <code>false</code> to abort the batch</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></dl> |
| </li> |
| </ul> |
| <a name="handleFailedWriting(java.lang.Exception, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>handleFailedWriting</h4> |
| <pre>public boolean handleFailedWriting(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries) |
| 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></pre> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had writing to the GSA while |
| sending a batch. This includes determining if the operation should be |
| retried or if it should be aborted while also allowing other logic, like |
| running <code>Thread.sleep()</code> to permit time for the situation to improve. |
| The thrown exception is provided as well as the number of times that this |
| batch was attempted to be sent. |
| |
| <p>By default, calls <a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleGeneric(java.lang.Exception, int)"><code>handleGeneric(java.lang.Exception, int)</code></a>.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html#handleFailedWriting(java.lang.Exception, int)">handleFailedWriting</a></code> in interface <code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html" title="interface in com.google.enterprise.adaptor">PushErrorHandler</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> to indicate the batch should be resent, |
| <code>false</code> to abort the batch</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></dl> |
| </li> |
| </ul> |
| <a name="handleFailedReadingReply(java.lang.Exception, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>handleFailedReadingReply</h4> |
| <pre>public boolean handleFailedReadingReply(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries) |
| 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></pre> |
| <div class="block">Handle a failure that <a href="../../../../com/google/enterprise/adaptor/DocIdPusher.html" title="interface in com.google.enterprise.adaptor"><code>DocIdPusher</code></a> had reading the GSA's response. |
| This includes determining if the operation should be retried or if it |
| should be aborted while also allowing other logic, like running <code>Thread.sleep()</code> to permit time for the situation to improve. The thrown |
| exception is provided as well as the number of times that this batch was |
| attempted to be sent. |
| |
| <p>By default, calls <a href="../../../../com/google/enterprise/adaptor/DefaultPushErrorHandler.html#handleGeneric(java.lang.Exception, int)"><code>handleGeneric(java.lang.Exception, int)</code></a>.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html#handleFailedReadingReply(java.lang.Exception, int)">handleFailedReadingReply</a></code> in interface <code><a href="../../../../com/google/enterprise/adaptor/PushErrorHandler.html" title="interface in com.google.enterprise.adaptor">PushErrorHandler</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd><code>true</code> to indicate the batch should be resent, |
| <code>false</code> to abort the batch</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></dl> |
| </li> |
| </ul> |
| <a name="handleGeneric(java.lang.Exception, int)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>handleGeneric</h4> |
| <pre>protected boolean handleGeneric(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> ex, |
| int ntries) |
| 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></pre> |
| <div class="block">Common handle method for generic error handling. The handler gives up after |
| <code>maximumTries</code> and sleeps <code>sleepTimeMillis * ntries</code> before |
| retrying.</div> |
| <dl><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></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="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="../../../../com/google/enterprise/adaptor/DefaultGetDocIdsErrorHandler.html" title="class in com.google.enterprise.adaptor"><span class="strong">PREV CLASS</span></a></li> |
| <li><a href="../../../../com/google/enterprise/adaptor/DocId.html" title="class in com.google.enterprise.adaptor"><span class="strong">NEXT CLASS</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?com/google/enterprise/adaptor/DefaultPushErrorHandler.html" target="_top">FRAMES</a></li> |
| <li><a href="DefaultPushErrorHandler.html" target="_top">NO FRAMES</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>SUMMARY: </li> |
| <li>NESTED | </li> |
| <li>FIELD | </li> |
| <li><a href="#constructor_summary">CONSTR</a> | </li> |
| <li><a href="#method_summary">METHOD</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>DETAIL: </li> |
| <li>FIELD | </li> |
| <li><a href="#constructor_detail">CONSTR</a> | </li> |
| <li><a href="#method_detail">METHOD</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |