Class NoOpAuditLogger

java.lang.Object
org.gridgain.internal.mcp.audit.NoOpAuditLogger
All Implemented Interfaces:
AuditLogger

public class NoOpAuditLogger extends Object implements AuditLogger
No-op implementation of AuditLogger for when audit logging is disabled.

All methods are no-ops and return immediately without any I/O or processing. Used when AUDIT_ENABLED=false to avoid overhead of audit logging.

  • Constructor Details

    • NoOpAuditLogger

      public NoOpAuditLogger()
  • Method Details

    • log

      public void log(AuditEvent event)
      Description copied from interface: AuditLogger
      Log an audit event asynchronously.

      Implementations should not block the caller. Events are typically queued and written in background threads.

      Specified by:
      log in interface AuditLogger
      Parameters:
      event - the audit event to log
    • flush

      public void flush()
      Description copied from interface: AuditLogger
      Flush any buffered audit events to persistent storage.

      Called during graceful shutdown to ensure no events are lost. Implementations should block until all pending events are written.

      Specified by:
      flush in interface AuditLogger
    • close

      public void close()
      Description copied from interface: AuditLogger
      Close the audit logger and release resources.

      Called during application shutdown. Should flush pending events and clean up any background threads or file handles.

      Specified by:
      close in interface AuditLogger