public abstract class TxRetryPolicy extends Object
NotificationContext.execute(co.cask.cdap.api.TxRunnable, co.cask.cdap.notifications.service.TxRetryPolicy) method
to specify behavior when transaction execution fails.| Modifier and Type | Class and Description |
|---|---|
static class |
TxRetryPolicy.Policy
Failure policy option enum.
|
| Constructor and Description |
|---|
TxRetryPolicy() |
| Modifier and Type | Method and Description |
|---|---|
abstract TxRetryPolicy.Policy |
handleFailure(int failures,
Throwable e)
Specify how failure should be handled.
|
static TxRetryPolicy |
maxRetries(int tries)
Create a
TxRetryPolicy object that retries a maximum of tries. |
public abstract TxRetryPolicy.Policy handleFailure(int failures, Throwable e)
failures - number of failures so far, including this onee - exception that caused the failureTxRetryPolicy.Policy code indicating what action should be donepublic static TxRetryPolicy maxRetries(int tries)
TxRetryPolicy object that retries a maximum of tries.tries - number of tries before dropping a transactionTxRetryPolicy object that will drop after the given amount of triesCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.