public interface RetryStrategy
Base interface for all RetryStrategy
implementations.
Modifier and Type | Method and Description |
---|---|
boolean |
shouldRetry(CouchbaseRequest request,
CoreEnvironment environment)
Decides whether the given
CouchbaseRequest should be retried or cancelled. |
boolean |
shouldRetryObserve()
Decides whether
ObserveRequest s should be retried or cancelled when an error happens. |
boolean shouldRetry(CouchbaseRequest request, CoreEnvironment environment)
Decides whether the given CouchbaseRequest
should be retried or cancelled.
request
- the request in question.environment
- the environment for more context.boolean shouldRetryObserve()
Decides whether ObserveRequest
s should be retried or cancelled when an error happens.
When false is returned, as soon as an error happens (for example one of the nodes that need to be reached does not have an active partition because of a node failure) the whole observe sequence is aborted. If retried, errors are swallowed and the observe cycle will start again.
Copyright © 2017 Couchbase, Inc.. All rights reserved.