public abstract class RetriableCommand extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
description |
| Constructor and Description |
|---|
RetriableCommand(String description)
Constructor.
|
RetriableCommand(String description,
org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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(org.apache.hadoop.io.retry.RetryPolicy retryHandler)
Fluent-interface to change the RetryHandler.
|
protected String description
public RetriableCommand(String description)
description - The human-readable description of the command.public RetriableCommand(String description, org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
description - The human-readable description of the command.retryPolicy - The RetryHandler to be used to compute retries.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.Exceptionpublic RetriableCommand setRetryPolicy(org.apache.hadoop.io.retry.RetryPolicy retryHandler)
retryHandler - The new RetryHandler instance to be used.Copyright © 2008–2020 Apache Software Foundation. All rights reserved.