public interface ErrorThreshold
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkThresholdExceeded(long errorCount,
Number totalItems)
Checks whether the error threshold was exceeded.
|
static ErrorThreshold |
forAbsoluteValue(long maxErrors)
Creates an
ErrorThreshold based on an absolute number of maximum allowed errors. |
static ErrorThreshold |
forRatio(float maxErrorRatio,
long minSample)
Creates an
ErrorThreshold based on a ratio of errors over the total items processed so
far. |
String |
thresholdAsString()
Returns a textual description of this threshold, mainly for informational purposes, e.g.
|
static ErrorThreshold |
unlimited()
Creates an
ErrorThreshold that cannot be exceeded. |
static ErrorThreshold forAbsoluteValue(long maxErrors)
ErrorThreshold based on an absolute number of maximum allowed errors.static ErrorThreshold forRatio(float maxErrorRatio, long minSample)
ErrorThreshold based on a ratio of errors over the total items processed so
far.maxErrorRatio - the maximum error ratio to tolerate, must be > 0 and < 1.minSample - the minimum sample count to observe; as long as the total number of items
processed is lesser than this number, the error ratio will not be tested.static ErrorThreshold unlimited()
ErrorThreshold that cannot be exceeded.boolean checkThresholdExceeded(long errorCount,
@NonNull
Number totalItems)
errorCount - the current number of errors encountered.totalItems - the total number of items processed so far.true if the threshold was exceeded, or false otherwise.String thresholdAsString()
Copyright © 2017–2021 DataStax. All rights reserved.