@ThreadSafe public final class AsyncUserAccessAuditLogWriter extends Object
AsyncUserAccessAuditLogWriter
writes user access audit log entries asynchronously.
TODO(yanqin) investigate other lock-free queues, e.g. Lmax disruptor used by Lmax and log4j 2Constructor and Description |
---|
AsyncUserAccessAuditLogWriter(String loggerName)
Constructs an
AsyncUserAccessAuditLogWriter instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
append(AuditContext context)
Appends an
AuditContext . |
long |
getAuditLogEntriesSize()
Gets the size of audit log entries.
|
void |
start()
Starts
AsyncUserAccessAuditLogWriter . |
void |
stop()
|
public AsyncUserAccessAuditLogWriter(String loggerName)
AsyncUserAccessAuditLogWriter
instance.loggerName
- the logger namepublic void start()
AsyncUserAccessAuditLogWriter
.public void stop()
public boolean append(AuditContext context)
AuditContext
.context
- the audit context to appendpublic long getAuditLogEntriesSize()
Copyright © 2023. All Rights Reserved.