Interface Batch

All Known Implementing Classes:
FileSystemBatch

public interface Batch
A storage representation for a collection of serialized AuditEvent instances. The number of records contained is generally governed by AuditProcessingProperties.getEventRecorderBatchFileMaxRecordCount().
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(String json)
    Add a single serialized record
    int
    The quantity of records currently in this batch
    The name of the batch representation.
    <T> T
    unwrap(Class<T> clazz)
    Reveal the core object representing the stored batch.
  • Method Details

    • append

      void append(String json)
      Add a single serialized record
      Parameters:
      json - serialized AuditEvent
    • count

      int count()
      The quantity of records currently in this batch
      Returns:
      The quantity of records currently in this batch
    • name

      String name()
      The name of the batch representation. Governed by the implementation. For example, FileSystemBatch will return the absolute path for the batch file as the name.
      Returns:
      The name of the batch representation
    • unwrap

      <T> T unwrap(Class<T> clazz)
      Reveal the core object representing the stored batch. For example, FileSystemBatch will return the Path to the batch file when unwrap(Path.class) is called.
      Type Parameters:
      T - The type of the core object
      Parameters:
      clazz - The type of the core object
      Returns:
      The core object