Class InMemoryAuditEventRepository
- java.lang.Object
- org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
- All Implemented Interfaces:
AuditEventRepository
public class InMemoryAuditEventRepository extends Object implements AuditEventRepository
In-memoryAuditEventRepository
implementation.
Constructor Summary
Constructors Constructor Description InMemoryAuditEventRepository()
InMemoryAuditEventRepository(int capacity)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(AuditEvent event)
Log an event.List<AuditEvent>
find(String principal, Instant after, String type)
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 Detail
InMemoryAuditEventRepository
public InMemoryAuditEventRepository()
InMemoryAuditEventRepository
public InMemoryAuditEventRepository(int capacity)
Method Detail
setCapacity
public void setCapacity(int capacity)
Set the capacity of this event repository.- Parameters:
capacity
- the capacity
add
public void add(AuditEvent event)
Description copied from interface:AuditEventRepository
Log an event.- Specified by:
add
in interfaceAuditEventRepository
- Parameters:
event
- the audit event to log
find
public List<AuditEvent> find(String principal, Instant after, String type)
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