@ThreadSafe public class AsynchronousAuditor extends AbstractAuditor
IConcurrentPerformer's queue as provided
in the constructor.stop() if this auditor is no longer used, so
that the created ExecutorService can be gracefully shutdown.| Constructor and Description |
|---|
AsynchronousAuditor(com.helger.security.authentication.subject.user.ICurrentUserIDProvider aUserIDProvider,
com.helger.commons.concurrent.collector.IConcurrentPerformer<List<IAuditItem>> aPerformer) |
| Modifier and Type | Method and Description |
|---|---|
int |
getQueueLength() |
protected void |
handleAuditItem(IAuditItem aAuditItem)
Implement this method to handle the created audit items.
|
com.helger.commons.state.EChange |
stop()
When using this auditor, it is important to call this
stop()
method before shutdown. |
createAuditItem, getActionStringProvider, getCurrentUserIDProvider, setActionStringProvider, setCurrentUserIDProviderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonCreateFailure, onCreateSuccess, onDeleteFailure, onDeleteSuccess, onExecuteFailure, onExecuteFailure, onExecuteSuccess, onExecuteSuccess, onModifyFailure, onModifySuccess, onUndeleteFailure, onUndeleteSuccesspublic AsynchronousAuditor(@Nonnull com.helger.security.authentication.subject.user.ICurrentUserIDProvider aUserIDProvider, @Nonnull com.helger.commons.concurrent.collector.IConcurrentPerformer<List<IAuditItem>> aPerformer)
protected void handleAuditItem(@Nonnull IAuditItem aAuditItem)
AbstractAuditorhandleAuditItem in class AbstractAuditoraAuditItem - The audit item to handle. Never null.@Nonnegative public int getQueueLength()
@Nonnull public com.helger.commons.state.EChange stop()
stop()
method before shutdown. It avoids further queuing of objects and waits
until all items are handled. This method blocks until all remaining objects
are handled.EChange.CHANGED if the shutdown was performed,
EChange.UNCHANGED if the auditor was already shut down.Copyright © 2014–2023 Philip Helger. All rights reserved.