public static class StreamAuditWriter.AuditLogWriterComputation extends AbstractBatchComputation
batchRecords, currentInputStream, newBatch, removeLastRecordOnRetry, thresholdMillis, TIMER_BATCH| Constructor and Description |
|---|
AuditLogWriterComputation(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
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) |
checkpointBatch, init, processFailure, processRecord, processRetry, processTimermetadataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, signalStoppublic AuditLogWriterComputation(String name)
public void batchProcess(ComputationContext context, String inputStreamName, List<Record> records)
AbstractBatchComputationbatchProcess in class AbstractBatchComputationcontext - 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 recordspublic void batchFailure(ComputationContext context, String inputStreamName, List<Record> records)
AbstractBatchComputationbatchFailure in class AbstractBatchComputationprotected void writeEntriesToAudit(List<LogEntry> logEntries)
protected LogEntry getLogEntryFromJson(byte[] data)
Copyright © 2019 Nuxeo. All rights reserved.