Package org.gridgain.internal.mcp.audit
Class NoOpAuditLogger
java.lang.Object
org.gridgain.internal.mcp.audit.NoOpAuditLogger
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the audit logger and release resources.voidflush()Flush any buffered audit events to persistent storage.voidlog(AuditEvent event) Log an audit event asynchronously.
-
Constructor Details
-
NoOpAuditLogger
public NoOpAuditLogger()
-
-
Method Details
-
log
Description copied from interface:AuditLoggerLog an audit event asynchronously.Implementations should not block the caller. Events are typically queued and written in background threads.
- Specified by:
login interfaceAuditLogger- Parameters:
event- the audit event to log
-
flush
public void flush()Description copied from interface:AuditLoggerFlush 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:
flushin interfaceAuditLogger
-
close
public void close()Description copied from interface:AuditLoggerClose 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:
closein interfaceAuditLogger
-