public class RetryOnConflictStrategy extends Object implements RetryStrategy
TransactionConflictException
.Constructor and Description |
---|
RetryOnConflictStrategy(int maxRetries,
long retryDelay) |
Modifier and Type | Method and Description |
---|---|
long |
nextRetry(TransactionFailureException reason,
int failureCount)
Returns the number of milliseconds to wait before retrying the operation.
|
public RetryOnConflictStrategy(int maxRetries, long retryDelay)
public long nextRetry(TransactionFailureException reason, int failureCount)
RetryStrategy
nextRetry
in interface RetryStrategy
reason
- Reason for transaction failure.failureCount
- Number of times that the request has been failed.0
means
retry it immediately, while negative means abort the operation.Copyright © 2016 The Apache Software Foundation. All rights reserved.