Class FileSystemBatch

java.lang.Object
com.broadleafcommerce.common.audit.batch.FileSystemBatch
All Implemented Interfaces:
Batch

public class FileSystemBatch extends Object implements Batch
File system version of Batch
  • Constructor Details

    • FileSystemBatch

      public FileSystemBatch(Path batchFile)
  • Method Details

    • append

      public void append(String json)
      Description copied from interface: Batch
      Add a single serialized record
      Specified by:
      append in interface Batch
      Parameters:
      json - serialized AuditEvent
    • count

      public int count()
      Description copied from interface: Batch
      The quantity of records currently in this batch
      Specified by:
      count in interface Batch
      Returns:
      The quantity of records currently in this batch
    • name

      public String name()
      Description copied from interface: Batch
      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.
      Specified by:
      name in interface Batch
      Returns:
      The name of the batch representation
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Description copied from interface: Batch
      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.
      Specified by:
      unwrap in interface Batch
      Type Parameters:
      T - The type of the core object
      Parameters:
      clazz - The type of the core object
      Returns:
      The core object