Class StreamAuditStorageWriter.AuditStorageLogWriterComputation

java.lang.Object
org.nuxeo.lib.stream.computation.AbstractComputation
org.nuxeo.audit.storage.stream.StreamAuditStorageWriter.AuditStorageLogWriterComputation
All Implemented Interfaces:
Computation
Enclosing class:
StreamAuditStorageWriter

public class StreamAuditStorageWriter.AuditStorageLogWriterComputation extends AbstractComputation
  • Field Details

    • batchSize

      protected final int batchSize
    • batchThresholdMs

      protected final int batchThresholdMs
    • jsonEntries

      protected final List<String> jsonEntries
  • Constructor Details

    • AuditStorageLogWriterComputation

      public AuditStorageLogWriterComputation(String name, int batchSize, int batchThresholdMs)
  • Method Details

    • init

      public void init(ComputationContext context)
      Description copied from interface: Computation
      Called when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.
      Specified by:
      init in interface Computation
      Overrides:
      init in class AbstractComputation
      Parameters:
      context - The computation context object provided by the system.
    • processTimer

      public void processTimer(ComputationContext context, String key, long timestamp)
      Description copied from interface: Computation
      Process a timer callback previously set via ComputationContext.setTimer(String, long).
      Specified by:
      processTimer in interface Computation
      Overrides:
      processTimer in class AbstractComputation
      Parameters:
      context - The computation context object provided by the system.
      key - The name of the timer.
      timestamp - The timestamp (in ms) for which the callback was scheduled.
    • processRecord

      public void processRecord(ComputationContext context, String inputStreamName, Record record)
      Description copied from interface: Computation
      Process an incoming record on one of the computation's input streams.
      Parameters:
      context - The computation context object provided by the system.
      inputStreamName - Name of the input stream that provides the record.
      record - The record.
    • destroy

      public void destroy()
      Description copied from interface: Computation
      Called when the framework is ready to shutdown the computation. Gives users a chance to perform some cleanup before the process is killed.
    • writeJsonEntriesToAudit

      protected void writeJsonEntriesToAudit(ComputationContext context)
      Store JSON entries in the Directory Audit Storage