public class RetryOnFailureXSiteCommand extends Object
RetryOnFailureXSiteCommand.RetryPolicy
to retry the command in case of an exception. The RetryOnFailureXSiteCommand.RetryPolicy
has the exception to decide if it should retry or not.| Modifier and Type | Class and Description |
|---|---|
static class |
RetryOnFailureXSiteCommand.MaxRetriesPolicy |
static interface |
RetryOnFailureXSiteCommand.RetryPolicy |
| Modifier and Type | Field and Description |
|---|---|
static RetryOnFailureXSiteCommand.RetryPolicy |
NO_RETRY |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Transport transport,
long waitTimeBetweenRetries,
TimeUnit unit)
Invokes remotely the command using the
Transport passed as parameter. |
static RetryOnFailureXSiteCommand |
newInstance(XSiteBackup backup,
XSiteReplicateCommand command,
RetryOnFailureXSiteCommand.RetryPolicy retryPolicy)
It builds a new instance with the destination site, the command and the retry policy.
|
String |
toString() |
public static final RetryOnFailureXSiteCommand.RetryPolicy NO_RETRY
public void execute(Transport transport, long waitTimeBetweenRetries, TimeUnit unit) throws Throwable
Transport passed as parameter.transport - the Transport to use.waitTimeBetweenRetries - the waiting time if the command fails before retrying it.unit - the TimeUnit of the waiting time.Throwable - if the maximum retries is reached (defined by the RetryOnFailureXSiteCommand.RetryPolicy,
the last exception occurred is thrown.public static RetryOnFailureXSiteCommand newInstance(XSiteBackup backup, XSiteReplicateCommand command, RetryOnFailureXSiteCommand.RetryPolicy retryPolicy)
backup - the destination site.command - the command to invoke remotely.retryPolicy - the retry policy.NullPointerException - if any parameter is nullCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.