Class InMemoryAuditEventRepository

java.lang.Object
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
All Implemented Interfaces:
AuditEventRepository

public class InMemoryAuditEventRepository extends Object implements AuditEventRepository
In-memory AuditEventRepository implementation.
Since:
1.0.0
Author:
Dave Syer, Phillip Webb, Vedran Pavic
  • 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

      public void add(AuditEvent event)
      Description copied from interface: AuditEventRepository
      Log an event.
      Specified by:
      add in interface AuditEventRepository
      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 occurred after the time provided.
      Specified by:
      find in interface AuditEventRepository
      Parameters:
      principal - the principal name to search for (or null if unrestricted)
      after - time after which an event must have occurred (or null if unrestricted)
      type - the event type to search for (or null if unrestricted)
      Returns:
      audit events of specified type relating to the principal