Class StreamAuditWriter.AuditLogWriterComputation

All Implemented Interfaces:
Computation
Enclosing class:
StreamAuditWriter

public static class StreamAuditWriter.AuditLogWriterComputation extends AbstractBatchComputation
  • Constructor Details

    • AuditLogWriterComputation

      public AuditLogWriterComputation(String name)
  • Method Details

    • batchProcess

      public void batchProcess(ComputationContext context, String inputStreamName, List<Record> records)
      Description copied from class: AbstractBatchComputation
      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.
      Specified by:
      batchProcess in class AbstractBatchComputation
      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 from
      records - the batch of records
    • batchFailure

      public void batchFailure(ComputationContext context, String inputStreamName, List<Record> records)
      Description copied from class: AbstractBatchComputation
      Called when the retry policy has failed.
      Specified by:
      batchFailure in class AbstractBatchComputation
    • writeEntriesToAudit

      protected void writeEntriesToAudit(List<LogEntry> logEntries)
    • getLogEntryFromJson

      protected LogEntry getLogEntryFromJson(byte[] data)