source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/retry/package-summary.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: 8.7 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:59 UTC 2009 -->
6<TITLE>
7org.apache.hadoop.io.retry (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="org.apache.hadoop.io.retry (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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.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;<A HREF="../../../../../org/apache/hadoop/io/file/tfile/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/io/serializer/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/io/retry/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="package-summary.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</TABLE>
78<A NAME="skip-navbar_top"></A>
79<!-- ========= END OF TOP NAVBAR ========= -->
80
81<HR>
82<H2>
83Package org.apache.hadoop.io.retry
84</H2>
85
86A mechanism for selectively retrying methods that throw exceptions under certain circumstances.
87<P>
88<B>See:</B>
89<BR>
90&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
91<P>
92
93<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
94<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
95<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
96<B>Interface Summary</B></FONT></TH>
97</TR>
98<TR BGCOLOR="white" CLASS="TableRowColor">
99<TD WIDTH="15%"><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry">RetryPolicy</A></B></TD>
100<TD>
101 Specifies a policy for retrying method failures.</TD>
102</TR>
103</TABLE>
104&nbsp;
105
106<P>
107
108<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
109<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
110<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
111<B>Class Summary</B></FONT></TH>
112</TR>
113<TR BGCOLOR="white" CLASS="TableRowColor">
114<TD WIDTH="15%"><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html" title="class in org.apache.hadoop.io.retry">RetryPolicies</A></B></TD>
115<TD>
116 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>.</TD>
117</TR>
118<TR BGCOLOR="white" CLASS="TableRowColor">
119<TD WIDTH="15%"><B><A HREF="../../../../../org/apache/hadoop/io/retry/RetryProxy.html" title="class in org.apache.hadoop.io.retry">RetryProxy</A></B></TD>
120<TD>
121 A factory for creating retry proxies.</TD>
122</TR>
123</TABLE>
124&nbsp;
125
126<P>
127<A NAME="package_description"><!-- --></A><H2>
128Package org.apache.hadoop.io.retry Description
129</H2>
130
131<P>
132<p>
133A mechanism for selectively retrying methods that throw exceptions under certain circumstances.
134</p>
135
136<p>
137Typical usage is
138</p>
139
140<pre>
141UnreliableImplementation unreliableImpl = new UnreliableImplementation();
142UnreliableInterface unreliable = (UnreliableInterface)
143  RetryProxy.create(UnreliableInterface.class, unreliableImpl,
144    RetryPolicies.retryUpToMaximumCountWithFixedSleep(4, 10, TimeUnit.SECONDS));
145unreliable.call();
146</pre>
147
148<p>
149This will retry any method called on <code>unreliable</code> four times - in this case the <code>call()</code>
150method - sleeping 10 seconds between
151each retry. There are a number of <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicies.html" title="class in org.apache.hadoop.io.retry"><CODE>retry policies</CODE></A>
152available, or you can implement a custom one by implementing <A HREF="../../../../../org/apache/hadoop/io/retry/RetryPolicy.html" title="interface in org.apache.hadoop.io.retry"><CODE>RetryPolicy</CODE></A>.
153It is also possible to specify retry policies on a
154<A HREF="../../../../../org/apache/hadoop/io/retry/RetryProxy.html#create(java.lang.Class, java.lang.Object, java.util.Map)"><CODE>per-method basis</CODE></A>.
155</p>
156<P>
157
158<P>
159<DL>
160</DL>
161<HR>
162
163
164<!-- ======= START OF BOTTOM NAVBAR ====== -->
165<A NAME="navbar_bottom"><!-- --></A>
166<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
167<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
168<TR>
169<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
170<A NAME="navbar_bottom_firstrow"><!-- --></A>
171<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
172  <TR ALIGN="center" VALIGN="top">
173  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
174  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
175  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
176  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
177  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
178  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
179  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
180  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
181  </TR>
182</TABLE>
183</TD>
184<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
185</EM>
186</TD>
187</TR>
188
189<TR>
190<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
191&nbsp;<A HREF="../../../../../org/apache/hadoop/io/file/tfile/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
192&nbsp;<A HREF="../../../../../org/apache/hadoop/io/serializer/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
193<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
194  <A HREF="../../../../../index.html?org/apache/hadoop/io/retry/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
195&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
196&nbsp;<SCRIPT type="text/javascript">
197  <!--
198  if(window==top) {
199    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
200  }
201  //-->
202</SCRIPT>
203<NOSCRIPT>
204  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
205</NOSCRIPT>
206
207
208</FONT></TD>
209</TR>
210</TABLE>
211<A NAME="skip-navbar_bottom"></A>
212<!-- ======== END OF BOTTOM NAVBAR ======= -->
213
214<HR>
215Copyright &copy; 2009 The Apache Software Foundation
216</BODY>
217</HTML>
Note: See TracBrowser for help on using the repository browser.