Package org.nuxeo.audit.impl
Class StreamAuditWriter.AuditLogWriterComputation
java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.lib.stream.computation.AbstractBatchComputation
org.nuxeo.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_BATCHFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbatchFailure(ComputationContext context, String inputStreamName, List<Record> records) Called when the retry policy has failed.voidbatchProcess(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 LogEntrygetLogEntryFromJson(byte[] data) protected voidwriteEntriesToAudit(List<LogEntry> logEntries) Methods inherited from class org.nuxeo.lib.stream.computation.AbstractBatchComputation
checkpointBatch, init, processFailure, processRecord, processRetry, processTimerMethods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.lib.stream.computation.Computation
destroy, signalStop
-
Constructor Details
-
AuditLogWriterComputation
-
-
Method Details
-
batchProcess
Description copied from class:AbstractBatchComputationCalled when:- the batch capacity is reached
- the time threshold is reached
- the inputStreamName has changed
- Specified by:
batchProcessin 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:AbstractBatchComputationCalled when the retry policy has failed.- Specified by:
batchFailurein classAbstractBatchComputation
-
writeEntriesToAudit
-
getLogEntryFromJson
-