source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/retry/RetryPolicies.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 27.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:54 UTC 2009 -->
6<TITLE>
7RetryPolicies (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="RetryPolicies (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RetryPolicies.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;PREV CLASS&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/io/retry/RetryPolicies.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="RetryPolicies.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.io.retry</FONT>
92<BR>
93Class RetryPolicies</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.io.retry.RetryPolicies</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>RetryPolicies</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104<p>
105 A collection of useful implementations of <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry"><CODE>RetryPolicy</CODE></A>.
106 </p>
107<P>
108
109<P>
110<HR>
111
112<P>
113<!-- =========== FIELD SUMMARY =========== -->
114
115<A NAME="field_summary"><!-- --></A>
116<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
117<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
118<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
119<B>Field Summary</B></FONT></TH>
120</TR>
121<TR BGCOLOR="white" CLASS="TableRowColor">
122<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
124<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#RETRY_FOREVER">RETRY_FOREVER</A></B></CODE>
125
126<BR>
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
128 Keep trying forever.</TD>
129</TR>
130<TR BGCOLOR="white" CLASS="TableRowColor">
131<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
133<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#TRY_ONCE_DONT_FAIL">TRY_ONCE_DONT_FAIL</A></B></CODE>
134
135<BR>
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
137 Try once, and fail silently for <code>void</code> methods, or by
138 re-throwing the exception for non-<code>void</code> methods.</TD>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
143<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#TRY_ONCE_THEN_FAIL">TRY_ONCE_THEN_FAIL</A></B></CODE>
144
145<BR>
146&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147 Try once, and fail by re-throwing the exception.</TD>
148</TR>
149</TABLE>
150&nbsp;
151<!-- ======== CONSTRUCTOR SUMMARY ======== -->
152
153<A NAME="constructor_summary"><!-- --></A>
154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
156<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
157<B>Constructor Summary</B></FONT></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#RetryPolicies()">RetryPolicies</A></B>()</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
164</TR>
165</TABLE>
166&nbsp;
167<!-- ========== METHOD SUMMARY =========== -->
168
169<A NAME="method_summary"><!-- --></A>
170<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
171<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
172<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
173<B>Method Summary</B></FONT></TH>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
178<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#exponentialBackoffRetry(int, long, java.util.concurrent.TimeUnit)">exponentialBackoffRetry</A></B>(int&nbsp;maxRetries,
179                        long&nbsp;sleepTime,
180                        <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
184 Keep trying a limited number of times, waiting a growing amount of time between attempts,
185 and then fail by re-throwing the exception.</TD>
186</TR>
187<TR BGCOLOR="white" CLASS="TableRowColor">
188<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
189<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
190<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#retryByException(org.apache.hadoop.io.retry.RetryPolicy, java.util.Map)">retryByException</A></B>(<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&nbsp;defaultPolicy,
191                 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&gt;,<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&gt;&nbsp;exceptionToPolicyMap)</CODE>
192
193<BR>
194&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195 Set a default policy with some explicit handlers for specific exceptions.</TD>
196</TR>
197<TR BGCOLOR="white" CLASS="TableRowColor">
198<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
199<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
200<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#retryByRemoteException(org.apache.hadoop.io.retry.RetryPolicy, java.util.Map)">retryByRemoteException</A></B>(<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&nbsp;defaultPolicy,
201                       <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&gt;,<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&gt;&nbsp;exceptionToPolicyMap)</CODE>
202
203<BR>
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
205 A retry policy for RemoteException
206 Set a default policy with some explicit handlers for specific exceptions.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
211<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#retryUpToMaximumCountWithFixedSleep(int, long, java.util.concurrent.TimeUnit)">retryUpToMaximumCountWithFixedSleep</A></B>(int&nbsp;maxRetries,
212                                    long&nbsp;sleepTime,
213                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</CODE>
214
215<BR>
216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
217 Keep trying a limited number of times, waiting a fixed time between attempts,
218 and then fail by re-throwing the exception.</TD>
219</TR>
220<TR BGCOLOR="white" CLASS="TableRowColor">
221<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
222<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
223<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#retryUpToMaximumCountWithProportionalSleep(int, long, java.util.concurrent.TimeUnit)">retryUpToMaximumCountWithProportionalSleep</A></B>(int&nbsp;maxRetries,
224                                           long&nbsp;sleepTime,
225                                           <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</CODE>
226
227<BR>
228&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
229 Keep trying a limited number of times, waiting a growing amount of time between attempts,
230 and then fail by re-throwing the exception.</TD>
231</TR>
232<TR BGCOLOR="white" CLASS="TableRowColor">
233<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
234<CODE>static&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></CODE></FONT></TD>
235<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html#retryUpToMaximumTimeWithFixedSleep(long, long, java.util.concurrent.TimeUnit)">retryUpToMaximumTimeWithFixedSleep</A></B>(long&nbsp;maxTime,
236                                   long&nbsp;sleepTime,
237                                   <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
241 Keep trying for a maximum time, waiting a fixed time between attempts,
242 and then fail by re-throwing the exception.</TD>
243</TR>
244</TABLE>
245&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
246<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
247<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
248<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD><CODE><A HREF="http://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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://java.sun.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></TD>
252</TR>
253</TABLE>
254&nbsp;
255<P>
256
257<!-- ============ FIELD DETAIL =========== -->
258
259<A NAME="field_detail"><!-- --></A>
260<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
261<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
262<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
263<B>Field Detail</B></FONT></TH>
264</TR>
265</TABLE>
266
267<A NAME="TRY_ONCE_THEN_FAIL"><!-- --></A><H3>
268TRY_ONCE_THEN_FAIL</H3>
269<PRE>
270public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>TRY_ONCE_THEN_FAIL</B></PRE>
271<DL>
272<DD><p>
273 Try once, and fail by re-throwing the exception.
274 This corresponds to having no retry mechanism in place.
275 </p>
276<P>
277<DL>
278</DL>
279</DL>
280<HR>
281
282<A NAME="TRY_ONCE_DONT_FAIL"><!-- --></A><H3>
283TRY_ONCE_DONT_FAIL</H3>
284<PRE>
285public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>TRY_ONCE_DONT_FAIL</B></PRE>
286<DL>
287<DD><p>
288 Try once, and fail silently for <code>void</code> methods, or by
289 re-throwing the exception for non-<code>void</code> methods.
290 </p>
291<P>
292<DL>
293</DL>
294</DL>
295<HR>
296
297<A NAME="RETRY_FOREVER"><!-- --></A><H3>
298RETRY_FOREVER</H3>
299<PRE>
300public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>RETRY_FOREVER</B></PRE>
301<DL>
302<DD><p>
303 Keep trying forever.
304 </p>
305<P>
306<DL>
307</DL>
308</DL>
309
310<!-- ========= CONSTRUCTOR DETAIL ======== -->
311
312<A NAME="constructor_detail"><!-- --></A>
313<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
314<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
315<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
316<B>Constructor Detail</B></FONT></TH>
317</TR>
318</TABLE>
319
320<A NAME="RetryPolicies()"><!-- --></A><H3>
321RetryPolicies</H3>
322<PRE>
323public <B>RetryPolicies</B>()</PRE>
324<DL>
325</DL>
326
327<!-- ============ METHOD DETAIL ========== -->
328
329<A NAME="method_detail"><!-- --></A>
330<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
331<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
332<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
333<B>Method Detail</B></FONT></TH>
334</TR>
335</TABLE>
336
337<A NAME="retryUpToMaximumCountWithFixedSleep(int, long, java.util.concurrent.TimeUnit)"><!-- --></A><H3>
338retryUpToMaximumCountWithFixedSleep</H3>
339<PRE>
340public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>retryUpToMaximumCountWithFixedSleep</B>(int&nbsp;maxRetries,
341                                                                    long&nbsp;sleepTime,
342                                                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</PRE>
343<DL>
344<DD><p>
345 Keep trying a limited number of times, waiting a fixed time between attempts,
346 and then fail by re-throwing the exception.
347 </p>
348<P>
349<DD><DL>
350</DL>
351</DD>
352</DL>
353<HR>
354
355<A NAME="retryUpToMaximumTimeWithFixedSleep(long, long, java.util.concurrent.TimeUnit)"><!-- --></A><H3>
356retryUpToMaximumTimeWithFixedSleep</H3>
357<PRE>
358public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>retryUpToMaximumTimeWithFixedSleep</B>(long&nbsp;maxTime,
359                                                                   long&nbsp;sleepTime,
360                                                                   <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</PRE>
361<DL>
362<DD><p>
363 Keep trying for a maximum time, waiting a fixed time between attempts,
364 and then fail by re-throwing the exception.
365 </p>
366<P>
367<DD><DL>
368</DL>
369</DD>
370</DL>
371<HR>
372
373<A NAME="retryUpToMaximumCountWithProportionalSleep(int, long, java.util.concurrent.TimeUnit)"><!-- --></A><H3>
374retryUpToMaximumCountWithProportionalSleep</H3>
375<PRE>
376public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>retryUpToMaximumCountWithProportionalSleep</B>(int&nbsp;maxRetries,
377                                                                           long&nbsp;sleepTime,
378                                                                           <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</PRE>
379<DL>
380<DD><p>
381 Keep trying a limited number of times, waiting a growing amount of time between attempts,
382 and then fail by re-throwing the exception.
383 The time between attempts is <code>sleepTime</code> mutliplied by the number of tries so far.
384 </p>
385<P>
386<DD><DL>
387</DL>
388</DD>
389</DL>
390<HR>
391
392<A NAME="exponentialBackoffRetry(int, long, java.util.concurrent.TimeUnit)"><!-- --></A><H3>
393exponentialBackoffRetry</H3>
394<PRE>
395public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>exponentialBackoffRetry</B>(int&nbsp;maxRetries,
396                                                        long&nbsp;sleepTime,
397                                                        <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;timeUnit)</PRE>
398<DL>
399<DD><p>
400 Keep trying a limited number of times, waiting a growing amount of time between attempts,
401 and then fail by re-throwing the exception.
402 The time between attempts is <code>sleepTime</code> mutliplied by a random
403 number in the range of [0, 2 to the number of retries)
404 </p>
405<P>
406<DD><DL>
407</DL>
408</DD>
409</DL>
410<HR>
411
412<A NAME="retryByException(org.apache.hadoop.io.retry.RetryPolicy, java.util.Map)"><!-- --></A><H3>
413retryByException</H3>
414<PRE>
415public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>retryByException</B>(<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&nbsp;defaultPolicy,
416                                                 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&gt;,<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&gt;&nbsp;exceptionToPolicyMap)</PRE>
417<DL>
418<DD><p>
419 Set a default policy with some explicit handlers for specific exceptions.
420 </p>
421<P>
422<DD><DL>
423</DL>
424</DD>
425</DL>
426<HR>
427
428<A NAME="retryByRemoteException(org.apache.hadoop.io.retry.RetryPolicy, java.util.Map)"><!-- --></A><H3>
429retryByRemoteException</H3>
430<PRE>
431public static final <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A> <B>retryByRemoteException</B>(<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&nbsp;defaultPolicy,
432                                                       <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A>&gt;,<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A>&gt;&nbsp;exceptionToPolicyMap)</PRE>
433<DL>
434<DD><p>
435 A retry policy for RemoteException
436 Set a default policy with some explicit handlers for specific exceptions.
437 </p>
438<P>
439<DD><DL>
440</DL>
441</DD>
442</DL>
443<!-- ========= END OF CLASS DATA ========= -->
444<HR>
445
446
447<!-- ======= START OF BOTTOM NAVBAR ====== -->
448<A NAME="navbar_bottom"><!-- --></A>
449<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
450<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
451<TR>
452<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
453<A NAME="navbar_bottom_firstrow"><!-- --></A>
454<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
455  <TR ALIGN="center" VALIGN="top">
456  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
457  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
458  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
459  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RetryPolicies.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
460  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
461  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
462  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
463  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
464  </TR>
465</TABLE>
466</TD>
467<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
468</EM>
469</TD>
470</TR>
471
472<TR>
473<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
474&nbsp;PREV CLASS&nbsp;
475&nbsp;<A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry"><B>NEXT CLASS</B></A></FONT></TD>
476<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
477  <A HREF="../../../../../index.html?org/apache/hadoop/io/retry/RetryPolicies.html" target="_top"><B>FRAMES</B></A>  &nbsp;
478&nbsp;<A HREF="RetryPolicies.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
479&nbsp;<SCRIPT type="text/javascript">
480  <!--
481  if(window==top) {
482    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
483  }
484  //-->
485</SCRIPT>
486<NOSCRIPT>
487  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
488</NOSCRIPT>
489
490
491</FONT></TD>
492</TR>
493<TR>
494<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
495  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
496<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
497DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
498</TR>
499</TABLE>
500<A NAME="skip-navbar_bottom"></A>
501<!-- ======== END OF BOTTOM NAVBAR ======= -->
502
503<HR>
504Copyright &copy; 2009 The Apache Software Foundation
505</BODY>
506</HTML>
Note: See TracBrowser for help on using the repository browser.