Package org.jesterj.ingest.model.impl
Class ScannerImpl.Builder
- java.lang.Object
-
- org.jesterj.ingest.model.impl.NamedBuilder<StepImpl>
-
- org.jesterj.ingest.model.impl.StepImpl.Builder
-
- org.jesterj.ingest.model.impl.ScannerImpl.Builder
-
- All Implemented Interfaces:
Buildable<StepImpl>,ConfiguredBuildable<StepImpl>
- Direct Known Subclasses:
JdbcScanner.Builder,SimpleFileScanner.Builder
- Enclosing class:
- ScannerImpl
public abstract static class ScannerImpl.Builder extends StepImpl.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ScannerImpl.BuilderbatchSize(int size)ScannerImpl.BuilderdetectChangesViaHashing(boolean hash)Turn on change detection via hashing.protected abstract ScannerImplgetObj()ScannerImpl.Buildernamed(java.lang.String stepName)ScannerImpl.BuilderrememberScannedIds(boolean remember)Turn on document id based memory.ScannerImpl.BuilderretryErroredDocsUpTo(int retries)The number of times to retry a document that has errored out previously before ignoring it.ScannerImpl.BuilderroutingBy(RouterBase.Builder<? extends Router> router)ScannerImpl.BuilderscanFreqMS(long interval)The scanning frequency.-
Methods inherited from class org.jesterj.ingest.model.impl.StepImpl.Builder
build, getStepName, withProcessor, withShutdownWait
-
Methods inherited from class org.jesterj.ingest.model.impl.NamedBuilder
isValid
-
-
-
-
Method Detail
-
batchSize
public ScannerImpl.Builder batchSize(int size)
- Overrides:
batchSizein classStepImpl.Builder
-
named
public ScannerImpl.Builder named(java.lang.String stepName)
- Overrides:
namedin classStepImpl.Builder
-
routingBy
public ScannerImpl.Builder routingBy(RouterBase.Builder<? extends Router> router)
- Overrides:
routingByin classStepImpl.Builder
-
getObj
protected abstract ScannerImpl getObj()
- Overrides:
getObjin classStepImpl.Builder
-
scanFreqMS
public ScannerImpl.Builder scanFreqMS(long interval)
The scanning frequency. 25ms is the minimum. Smaller intervals will be treated as 25ms- Parameters:
interval- a number of milliseconds >= 25- Returns:
- This builder object for further configuration.
-
retryErroredDocsUpTo
public ScannerImpl.Builder retryErroredDocsUpTo(int retries)
The number of times to retry a document that has errored out previously before ignoring it.- Parameters:
retries- the number of time to retry an erroring document before giving up- Returns:
- this builder for further configuration.
-
rememberScannedIds
public ScannerImpl.Builder rememberScannedIds(boolean remember)
Turn on document id based memory. When enabled this option will cause the scanner not to submit documents that have already been indexed a second time unless they have been marked dirty, the scanner's heuristics determine that the document is dirty, or hash based change detection has indicated that the document has changed.- Parameters:
remember- whether to track which documents have already been submitted- Returns:
- This builder object for further configuration
-
detectChangesViaHashing
public ScannerImpl.Builder detectChangesViaHashing(boolean hash)
Turn on change detection via hashing. When this feature is enabled, the raw bytes of the document and the backing multimap's contents (e.g. field data from scans of data stores such as databases) will be used to create an md5 hash which is stored and compared on subsequent scans. If the previous hash differs from the current hash, the document will be considered dirty, and eligible for reprocessing. Note that this has no effect unlessrememberScannedIds(boolean)is turned on, because without that option, all documents are considered dirty every time.- Parameters:
hash- whether or not to perform hashing to track document changes- Returns:
- This builder object for further configuration
-
-