Package org.nuxeo.ecm.core.work
Class WorkComputation
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.ecm.core.work.WorkComputation
- All Implemented Interfaces:
Computation
A Stream computation that consumes works.
- Since:
- 9.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected final longprotected Workprotected final org.apache.commons.collections4.queue.CircularFifoQueue<String> protected final io.dropwizard.metrics5.TimerFields inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
INPUT_1, INPUT_2, INPUT_3, INPUT_NULL, metadata, OUTPUT_1, OUTPUT_2, OUTPUT_3, OUTPUT_4 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanupWorkInFailure(Work work, Exception exception) static Workdeserialize(byte[] data) voidprocessRecord(ComputationContext context, String inputStreamName, Record record) Process an incoming record on one of the computation's input streams.static byte[]voidA hook to inform that computation will be soon destroyed.Methods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
init, metadata, processFailure, processRetry, processTimerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.lib.stream.computation.Computation
destroy
-
Field Details
-
IDS_SIZE
protected static final int IDS_SIZE- See Also:
-
workIds
-
workTimer
protected final io.dropwizard.metrics5.Timer workTimer -
stateTTL
protected final long stateTTL -
work
-
-
Constructor Details
-
WorkComputation
-
-
Method Details
-
signalStop
public void signalStop()Description copied from interface:ComputationA hook to inform that computation will be soon destroyed. It gives a way for long processing to cooperate to a quick shutdown.
This method is not invoked from the computation thread, it should only set some volatile flag and returns immediately. -
processRecord
Description copied from interface:ComputationProcess an incoming record on one of the computation's input streams.- Parameters:
context- The computation context object provided by the system.inputStreamName- Name of the input stream that provides the record.record- The record.
-
cleanupWorkInFailure
-
deserialize
-
serialize
-