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
public class MakeBlob extends AbstractTransientBlobComputation
- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static longCHECK_DELAY_MSprotected Map<String,Long>countersprotected static StringEXPOSE_BLOB_STREAMprotected static longFLUSH_UNFINISHED_BLOBS_DELAY_MSprotected static StringFLUSH_UNFINISHED_BLOBS_TIMERprotected Map<String,DataBucket>lastBucketsstatic StringNAMEprotected static intNB_OUTPUT_STREAMSprotected booleanproduceImmediateprotected static StringSORT_STREAMprotected Map<String,Long>totalsprotected static StringZIP_STREAM-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappendHeaderFooterToFile(Path filePath, String commandId, byte[] header, byte[] footer)protected PathappendToFile(String commandId, byte[] content)protected voidfinishBlob(ComputationContext context, String commandId)protected StringgetOutputStream(String commandId)protected LonggetTotal(String commandId)voidinit(ComputationContext context)Called when the framework has registered the computation successfully.voidprocessRecord(ComputationContext context, String documentIdsStreamName, Record record)Process an incoming record on one of the computation's input streams.voidprocessTimer(ComputationContext context, String key, long timestamp)Process a timer callback previously set viaComputationContext.setTimer(String, long).protected StringsaveInTransientStore(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 Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
CHECK_DELAY_MS
protected static final long CHECK_DELAY_MS
- See Also:
- Constant Field Values
-
FLUSH_UNFINISHED_BLOBS_DELAY_MS
protected static final long FLUSH_UNFINISHED_BLOBS_DELAY_MS
- See Also:
- Constant Field Values
-
FLUSH_UNFINISHED_BLOBS_TIMER
protected static final String FLUSH_UNFINISHED_BLOBS_TIMER
- See Also:
- Constant Field Values
-
SORT_STREAM
protected static final String SORT_STREAM
- See Also:
- Constant Field Values
-
ZIP_STREAM
protected static final String ZIP_STREAM
- See Also:
- Constant Field Values
-
EXPOSE_BLOB_STREAM
protected static final String EXPOSE_BLOB_STREAM
- See Also:
- Constant Field Values
-
NB_OUTPUT_STREAMS
protected static final int NB_OUTPUT_STREAMS
- See Also:
- Constant Field Values
-
lastBuckets
protected final Map<String,DataBucket> lastBuckets
-
produceImmediate
protected final boolean produceImmediate
-
-
Method Detail
-
init
public void init(ComputationContext context)
Description copied from interface:ComputationCalled 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:
initin interfaceComputation- Overrides:
initin classAbstractTransientBlobComputation- Parameters:
context- The computation context object provided by the system.
-
processTimer
public void processTimer(ComputationContext context, String key, long timestamp)
Description copied from interface:ComputationProcess a timer callback previously set viaComputationContext.setTimer(String, long).- Specified by:
processTimerin interfaceComputation- Overrides:
processTimerin 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
public void processRecord(ComputationContext context, String documentIdsStreamName, Record record)
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.documentIdsStreamName- Name of the input stream that provides the record.record- The record.
-
appendHeaderFooterToFile
protected void appendHeaderFooterToFile(Path filePath, String commandId, byte[] header, byte[] footer)
-
finishBlob
protected void finishBlob(ComputationContext context, String commandId)
-
-