Package org.nuxeo.lib.stream.computation
Class ComputationPolicy
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.ComputationPolicy
-
public class ComputationPolicy extends Object
Defines how a computation should handle the retries, fallback and batching if any.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected int
batchCapacity
protected Duration
batchThreshold
static net.jodah.failsafe.RetryPolicy
NO_RETRY
static ComputationPolicy
NONE
protected net.jodah.failsafe.RetryPolicy
retryPolicy
protected boolean
skipFailure
protected int
skipFirstFailures
-
Constructor Summary
Constructors Constructor Description ComputationPolicy(ComputationPolicyBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
continueOnFailure()
int
getBatchCapacity()
Duration
getBatchThreshold()
net.jodah.failsafe.RetryPolicy
getRetryPolicy()
int
getSkipFirstFailures()
boolean
isSkipFailure()
Deprecated.since 10.3 usecontinueOnFailure()
insteadString
toString()
-
-
-
Field Detail
-
NO_RETRY
public static final net.jodah.failsafe.RetryPolicy NO_RETRY
-
NONE
public static final ComputationPolicy NONE
-
retryPolicy
protected final net.jodah.failsafe.RetryPolicy retryPolicy
-
batchCapacity
protected final int batchCapacity
-
batchThreshold
protected final Duration batchThreshold
-
skipFailure
protected final boolean skipFailure
-
skipFirstFailures
protected final int skipFirstFailures
-
-
Constructor Detail
-
ComputationPolicy
public ComputationPolicy(ComputationPolicyBuilder builder)
-
-
Method Detail
-
getRetryPolicy
public net.jodah.failsafe.RetryPolicy getRetryPolicy()
-
getBatchCapacity
public int getBatchCapacity()
-
getBatchThreshold
public Duration getBatchThreshold()
-
continueOnFailure
public boolean continueOnFailure()
-
getSkipFirstFailures
public int getSkipFirstFailures()
-
isSkipFailure
@Deprecated public boolean isSkipFailure()
Deprecated.since 10.3 usecontinueOnFailure()
instead
-
-