Class StreamAuditWriter.AuditLogWriterComputation
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.lib.stream.computation.AbstractBatchComputation
org.nuxeo.ecm.platform.audit.impl.StreamAuditWriter.AuditLogWriterComputation
- All Implemented Interfaces:
Computation
- Enclosing class:
- StreamAuditWriter
-
Field Summary
Fields inherited from class org.nuxeo.lib.stream.computation.AbstractBatchComputation
batchRecords, currentInputStream, newBatch, removeLastRecordOnRetry, thresholdMillis, TIMER_BATCH
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 TypeMethodDescriptionvoid
batchFailure
(ComputationContext context, String inputStreamName, List<Record> records) Called when the retry policy has failed.void
batchProcess
(ComputationContext context, String inputStreamName, List<Record> records) Called when: the batch capacity is reached the time threshold is reached the inputStreamName has changed If this method raises an exception the retry policy is applied.protected LogEntry
getLogEntryFromJson
(byte[] data) protected void
writeEntriesToAudit
(List<LogEntry> logEntries) Methods inherited from class org.nuxeo.lib.stream.computation.AbstractBatchComputation
checkpointBatch, init, processFailure, processRecord, processRetry, processTimer
Methods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadata
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
-
Constructor Details
-
AuditLogWriterComputation
-
-
Method Details
-
batchProcess
Description copied from class:AbstractBatchComputation
Called when:- the batch capacity is reached
- the time threshold is reached
- the inputStreamName has changed
- Specified by:
batchProcess
in classAbstractBatchComputation
- Parameters:
context
- used to send records to output streams, note that the checkpoint is managed automatically.inputStreamName
- the input streams where the records are coming fromrecords
- the batch of records
-
batchFailure
Description copied from class:AbstractBatchComputation
Called when the retry policy has failed.- Specified by:
batchFailure
in classAbstractBatchComputation
-
writeEntriesToAudit
-
getLogEntryFromJson
-