|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.tools.util.RetriableCommand
public abstract class RetriableCommand
This class represents commands that be retried on failure, in a configurable manner.
| Field Summary | |
|---|---|
protected String |
description
|
| Constructor Summary | |
|---|---|
RetriableCommand(String description)
Constructor. |
|
RetriableCommand(String description,
RetryPolicy retryPolicy)
Constructor. |
|
| Method Summary | |
|---|---|
protected abstract Object |
doExecute(Object... arguments)
Implement this interface-method define the command-logic that will be retried on failure (i.e. |
Object |
execute(Object... arguments)
The execute() method invokes doExecute() until either: 1. |
RetriableCommand |
setRetryPolicy(RetryPolicy retryHandler)
Fluent-interface to change the RetryHandler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String description
| Constructor Detail |
|---|
public RetriableCommand(String description)
description - The human-readable description of the command.
public RetriableCommand(String description,
RetryPolicy retryPolicy)
description - The human-readable description of the command.retryPolicy - The RetryHandler to be used to compute retries.| Method Detail |
|---|
protected abstract Object doExecute(Object... arguments)
throws Exception
arguments - Argument-list to the command.
Exception - Throws Exception on complete failure.
public Object execute(Object... arguments)
throws Exception
arguments - The list of arguments for the command.
IOException, - IOException, on complete failure.
Exceptionpublic RetriableCommand setRetryPolicy(RetryPolicy retryHandler)
retryHandler - The new RetryHandler instance to be used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||