Package org.nuxeo.audit.storage.stream
Class StreamAuditStorageWriter.AuditStorageLogWriterComputation
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.audit.storage.stream.StreamAuditStorageWriter.AuditStorageLogWriterComputation
- All Implemented Interfaces:
Computation
- Enclosing class:
- StreamAuditStorageWriter
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int
protected final int
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
ConstructorDescriptionAuditStorageLogWriterComputation
(String name, int batchSize, int batchThresholdMs) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Called when the framework is ready to shutdown the computation.void
init
(ComputationContext context) Called when the framework has registered the computation successfully.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 viaComputationContext.setTimer(String, long)
.protected void
Store JSON entries in the Directory Audit StorageMethods 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
signalStop
-
Field Details
-
batchSize
protected final int batchSize -
batchThresholdMs
protected final int batchThresholdMs -
jsonEntries
-
-
Constructor Details
-
AuditStorageLogWriterComputation
-
-
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 classAbstractComputation
- 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.inputStreamName
- Name of the input stream that provides the record.record
- The record.
-
destroy
public void destroy()Description copied from interface:Computation
Called when the framework is ready to shutdown the computation. Gives users a chance to perform some cleanup before the process is killed. -
writeJsonEntriesToAudit
Store JSON entries in the Directory Audit Storage
-