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 long
CHECK_DELAY_MS
protected Map<String,Long>
counters
protected static String
EXPOSE_BLOB_STREAM
protected static long
FLUSH_UNFINISHED_BLOBS_DELAY_MS
protected static String
FLUSH_UNFINISHED_BLOBS_TIMER
protected Map<String,DataBucket>
lastBuckets
static String
NAME
protected static int
NB_OUTPUT_STREAMS
protected boolean
produceImmediate
protected static String
SORT_STREAM
protected Map<String,Long>
totals
protected static String
ZIP_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 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
getTotal(String commandId)
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 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: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
public void processTimer(ComputationContext context, String key, long timestamp)
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
public void processRecord(ComputationContext context, String documentIdsStreamName, Record record)
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.
-
appendHeaderFooterToFile
protected void appendHeaderFooterToFile(Path filePath, String commandId, byte[] header, byte[] footer)
-
finishBlob
protected void finishBlob(ComputationContext context, String commandId)
-
-