public static class StreamBulkProcessor.BulkDocumentScrollerComputation extends AbstractComputation
Modifier and Type | Field and Description |
---|---|
protected int |
bucketSize |
protected List<String> |
documentIds |
protected int |
scrollBatchSize |
protected int |
scrollKeepAliveSeconds |
metadata
Constructor and Description |
---|
BulkDocumentScrollerComputation(String name,
int nbOutputStreams,
int scrollBatchSize,
int scrollKeepAliveSeconds,
int bucketSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
processRecord(ComputationContext context,
Record record) |
void |
processRecord(ComputationContext context,
String inputStreamName,
Record record)
Process an incoming record on one of the computation's input streams.
|
protected void |
produceBucket(ComputationContext context,
String action,
String commandId,
long nbDocSent)
Produces a bucket as a record to appropriate bulk action stream.
|
init, metadata, processTimer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, signalStop
protected final int scrollBatchSize
protected final int scrollKeepAliveSeconds
protected final int bucketSize
protected final List<String> documentIds
public BulkDocumentScrollerComputation(String name, int nbOutputStreams, int scrollBatchSize, int scrollKeepAliveSeconds, int bucketSize)
name
- the computation namenbOutputStreams
- the number of registered bulk action streamsscrollBatchSize
- the batch size to scrollscrollKeepAliveSeconds
- the scroll lifetimebucketSize
- the number of document to send per bucketpublic void processRecord(ComputationContext context, String inputStreamName, Record record)
Computation
context
- The computation context object provided by the system.inputStreamName
- Name of the input stream that provides the record.record
- The record.protected void processRecord(ComputationContext context, Record record)
protected void produceBucket(ComputationContext context, String action, String commandId, long nbDocSent)
Copyright © 2018 Nuxeo. All rights reserved.