Class MakeBlob
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.ecm.core.bulk.action.computation.AbstractTransientBlobComputation
org.nuxeo.ecm.core.bulk.action.computation.MakeBlob
- All Implemented Interfaces:
Computation
- Since:
- 10.3
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final long
protected static final String
protected static final long
protected static final String
protected final Map<String,
DataBucket> static final String
protected static final int
protected final boolean
protected static final String
protected static final String
Fields inherited from class org.nuxeo.ecm.core.bulk.action.computation.AbstractTransientBlobComputation
id, temp
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendHeaderFooterToFile
(Path filePath, String commandId, byte[] header, byte[] footer) protected Path
appendToFile
(String commandId, byte[] content) protected void
finishBlob
(ComputationContext context, String commandId) protected String
getOutputStream
(String commandId) protected Long
void
init
(ComputationContext context) Called when the framework has registered the computation successfully.void
processRecord
(ComputationContext context, String documentIdsStreamName, 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 viaComputationContext.setTimer(String, long)
.protected String
saveInTransientStore
(String commandId, String storeName) Methods inherited from class org.nuxeo.ecm.core.bulk.action.computation.AbstractTransientBlobComputation
createTemp, getBlob, getTransientStoreKey, storeBlob
Methods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadata, processFailure, processRetry
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.lib.stream.computation.Computation
destroy, signalStop
-
Field Details
-
NAME
- See Also:
-
CHECK_DELAY_MS
protected static final long CHECK_DELAY_MS- See Also:
-
FLUSH_UNFINISHED_BLOBS_DELAY_MS
protected static final long FLUSH_UNFINISHED_BLOBS_DELAY_MS- See Also:
-
FLUSH_UNFINISHED_BLOBS_TIMER
- See Also:
-
SORT_STREAM
- See Also:
-
ZIP_STREAM
- See Also:
-
EXPOSE_BLOB_STREAM
- See Also:
-
NB_OUTPUT_STREAMS
protected static final int NB_OUTPUT_STREAMS- See Also:
-
counters
-
totals
-
lastBuckets
-
produceImmediate
protected final boolean produceImmediate
-
-
Constructor Details
-
MakeBlob
public MakeBlob() -
MakeBlob
public MakeBlob(boolean produceImmediate)
-
-
Method Details
-
init
Description copied from interface:Computation
Called when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.- Specified by:
init
in interfaceComputation
- Overrides:
init
in classAbstractTransientBlobComputation
- Parameters:
context
- The computation context object provided by the system.
-
processTimer
Description copied from interface:Computation
Process a timer callback previously set viaComputationContext.setTimer(String, long)
.- Specified by:
processTimer
in interfaceComputation
- Overrides:
processTimer
in classAbstractComputation
- Parameters:
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.
-
processRecord
Description copied from interface:Computation
Process an incoming record on one of the computation's input streams.- Parameters:
context
- The computation context object provided by the system.documentIdsStreamName
- Name of the input stream that provides the record.record
- The record.
-
getTotal
-
appendToFile
-
saveInTransientStore
-
getOutputStream
-
finishBlob
-