Class InMemoryAuditEventRepository
java.lang.Object
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
- All Implemented Interfaces:
AuditEventRepository
In-memory
AuditEventRepository
implementation.- Since:
- 1.0.0
- Author:
- Dave Syer, Phillip Webb, Vedran Pavic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AuditEvent event) Log an event.Find audit events of specified type relating to the specified principal that occurredafter
the time provided.void
setCapacity
(int capacity) Set the capacity of this event repository.
-
Constructor Details
-
InMemoryAuditEventRepository
public InMemoryAuditEventRepository() -
InMemoryAuditEventRepository
public InMemoryAuditEventRepository(int capacity)
-
-
Method Details
-
setCapacity
public void setCapacity(int capacity) Set the capacity of this event repository.- Parameters:
capacity
- the capacity
-
add
Description copied from interface:AuditEventRepository
Log an event.- Specified by:
add
in interfaceAuditEventRepository
- Parameters:
event
- the audit event to log
-
find
Description copied from interface:AuditEventRepository
Find audit events of specified type relating to the specified principal that occurredafter
the time provided.- Specified by:
find
in interfaceAuditEventRepository
- Parameters:
principal
- the principal name to search for (ornull
if unrestricted)after
- time after which an event must have occurred (ornull
if unrestricted)type
- the event type to search for (ornull
if unrestricted)- Returns:
- audit events of specified type relating to the principal
-