RetryProxy (Hadoop 0.20.2-cdh3u3 API)
Date: 2012-03-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.io.retry
Class RetryProxy

    java.lang.Object
      org.apache.hadoop.io.retry.RetryProxy

    public class RetryProxy

extends Object

A factory for creating retry proxies.

Constructor Summary
`RetryProxy()`

Method Summary
`static Object` | `create(Class<?> iface, Object implementation, Map<String,RetryPolicy> methodNameToPolicyMap)` Create a proxy for an interface of an implementation class using the a set of retry policies specified by method name.
`static Object` | `create(Class<?> iface, Object implementation, RetryPolicy retryPolicy)` Create a proxy for an interface of an implementation class using the same retry policy for each method in the interface.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RetryProxy

    public RetryProxy()

Method Detail

### create

    public static Object create(Class<?> iface,
                                Object implementation,
                                RetryPolicy retryPolicy)

  Create a proxy for an interface of an implementation class using the same retry policy for each method in the interface.

  Parameters:
    `iface` - the interface that the retry will implement
    `implementation` - the instance whose methods should be retried
    `retryPolicy` - the policy for retirying method call failures
  Returns:
    the retry proxy

### create

    public static Object create(Class<?> iface,
                                Object implementation,
                                Map<String,RetryPolicy> methodNameToPolicyMap)

  Create a proxy for an interface of an implementation class using the a set of retry policies specified by method name. If no retry policy is defined for a method then a default of `RetryPolicies.TRY_ONCE_THEN_FAIL` is used.

  Parameters:
    `iface` - the interface that the retry will implement
    `implementation` - the instance whose methods should be retried
    `methodNameToPolicyMap` - a map of method names to retry policies
  Returns:
    the retry proxy

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation