public abstract class AbstractBulkComputation extends AbstractComputation
Inputs:
BulkBucketBulkStatus delta| Modifier and Type | Field and Description | 
|---|---|
protected BulkCommand | 
command  | 
protected Map<String,BulkCommand> | 
commands  | 
protected BulkStatus | 
delta  | 
protected static String | 
SELECT_DOCUMENTS_IN  | 
| Constructor and Description | 
|---|
AbstractBulkComputation(String name)  | 
AbstractBulkComputation(String name,
                       int nbOutputStreams)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract void | 
compute(CoreSession session,
       List<String> ids,
       Map<String,Serializable> properties)  | 
void | 
endBucket(ComputationContext context,
         BulkStatus delta)
Can be overridden to write to downstream computation or add results to status 
 | 
protected BulkCommand | 
getCommand(String commandId)  | 
BulkCommand | 
getCurrentCommand()  | 
protected boolean | 
isAbortedCommand(String commandId)  | 
DocumentModelList | 
loadDocuments(CoreSession session,
             List<String> documentIds)
Helper to load a list of documents. 
 | 
protected void | 
processBatchOfDocuments(List<String> batch)  | 
void | 
processFailure(ComputationContext context,
              Throwable failure)
 | 
void | 
processRecord(ComputationContext context,
             String inputStreamName,
             Record record)
Process an incoming record on one of the computation's input streams. 
 | 
void | 
startBucket(String bucketKey)
Can be overridden to init stuff before processing the bucket 
 | 
static void | 
updateStatus(ComputationContext context,
            BulkStatus delta)  | 
init, metadata, processRetry, processTimerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, signalStopprotected static final String SELECT_DOCUMENTS_IN
protected Map<String,BulkCommand> commands
protected BulkCommand command
protected BulkStatus delta
public AbstractBulkComputation(String name)
public AbstractBulkComputation(String name, int nbOutputStreams)
public void processRecord(ComputationContext context, String inputStreamName, Record record)
Computationcontext - The computation context object provided by the system.inputStreamName - Name of the input stream that provides the record.record - The record.protected boolean isAbortedCommand(String commandId)
protected BulkCommand getCommand(String commandId)
public BulkCommand getCurrentCommand()
protected void processBatchOfDocuments(List<String> batch)
public void startBucket(String bucketKey)
public void endBucket(ComputationContext context, BulkStatus delta)
public void processFailure(ComputationContext context, Throwable failure)
ComputationComputation.processRecord(org.nuxeo.lib.stream.computation.ComputationContext, java.lang.String, org.nuxeo.lib.stream.computation.Record) or Computation.processTimer(org.nuxeo.lib.stream.computation.ComputationContext, java.lang.String, long) fails and cannot be retried.processFailure in interface ComputationprocessFailure in class AbstractComputationpublic static void updateStatus(ComputationContext context, BulkStatus delta)
protected abstract void compute(CoreSession session, List<String> ids, Map<String,Serializable> properties)
public DocumentModelList loadDocuments(CoreSession session, List<String> documentIds)
Copyright © 2019 Nuxeo. All rights reserved.