IndexBackfillSettings constructor
IndexBackfillSettings({})
Throws an ArgumentError when documentsPerRun is not between 1 and
maxDocumentsPerRun, when interval is shorter than minInterval or
longer than maxDelay, or when initialDelay is negative or longer than
maxDelay.
Implementation
IndexBackfillSettings({
this.documentsPerRun = defaultDocumentsPerRun,
this.interval = defaultInterval,
this.initialDelay = defaultInitialDelay,
}) {
if (documentsPerRun < 1 || documentsPerRun > maxDocumentsPerRun) {
throw ArgumentError.value(
documentsPerRun,
'documentsPerRun',
'must be between 1 and $maxDocumentsPerRun',
);
}
if (interval < minInterval || interval > maxDelay) {
throw ArgumentError.value(
interval,
'interval',
'must be between $minInterval and $maxDelay',
);
}
if (initialDelay < Duration.zero || initialDelay > maxDelay) {
throw ArgumentError.value(
initialDelay,
'initialDelay',
'must be between ${Duration.zero} and $maxDelay',
);
}
}