public static class SetPropertiesAction.SetPropertyComputation extends AbstractComputation
Modifier and Type | Field and Description |
---|---|
protected int |
batchSize |
protected int |
batchThresholdMs |
protected BulkCommand |
currentCommand |
protected String |
currentCommandId |
protected List<String> |
documentIds |
metadata
Constructor and Description |
---|
SetPropertyComputation(String name,
int batchSize,
int batchThresholdMs) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called when the framework is ready to shutdown the computation.
|
void |
init(ComputationContext context)
Called when the framework has registered the computation successfully.
|
protected void |
loadCurrentBulkCommandContext(String commandId) |
protected void |
processBatch(ComputationContext context) |
void |
processRecord(ComputationContext context,
String inputStreamName,
Record record)
Process an incoming record on one of the computation's input streams.
|
void |
processTimer(ComputationContext context,
String key,
long timestamp)
Process a timer callback previously set via
ComputationContext.setTimer(String, long) . |
metadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
signalStop
protected final int batchSize
protected final int batchThresholdMs
protected final List<String> documentIds
protected String currentCommandId
protected BulkCommand currentCommand
public SetPropertyComputation(String name, int batchSize, int batchThresholdMs)
public void init(ComputationContext context)
Computation
init
in interface Computation
init
in class AbstractComputation
context
- The computation context object provided by the system.public void processTimer(ComputationContext context, String key, long timestamp)
Computation
ComputationContext.setTimer(String, long)
.processTimer
in interface Computation
processTimer
in class AbstractComputation
context
- The computation context object provided by the system.key
- The name of the timer.timestamp
- The timestamp (in ms) for which the callback was scheduled.public 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 loadCurrentBulkCommandContext(String commandId)
public void destroy()
Computation
protected void processBatch(ComputationContext context)
Copyright © 2018 Nuxeo. All rights reserved.