Interface AuditSink
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
CompositeAuditSink, FileAuditSink, InMemoryAuditSink, StdoutAuditSink, SyslogAuditSink
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
SPI for persisting audit events.
Implementations must apply appropriate redaction policies and must never write secrets.
Thread safety
Implementations must be thread-safe; the PKI server calls
record(AuditEvent) from multiple threads concurrently.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Releases lifecycle-owned sink resources.voidrecord(AuditEvent event) Persists an audit event.
-
Method Details
-
record
Persists an audit event.- Parameters:
event- audit event- Throws:
IllegalArgumentException- ifeventis nullRuntimeException- if persistence fails
-
close
default void close()Releases lifecycle-owned sink resources.The default implementation owns no closeable resource. Stateful providers may override this method; repeated close calls should be harmless.
- Specified by:
closein interfaceAutoCloseable
-