Class MemoryBasedAuditEventRepository

java.lang.Object
se.swedenconnect.spring.saml.idp.audit.repository.FilteringAuditEventRepository
se.swedenconnect.spring.saml.idp.audit.repository.MemoryBasedAuditEventRepository
All Implemented Interfaces:
org.springframework.boot.actuate.audit.AuditEventRepository

public class MemoryBasedAuditEventRepository extends FilteringAuditEventRepository
An in-memory AuditEventRepository that adds filtering support (compared to InMemoryAuditEventRepository).
Author:
Martin Lindström
  • Field Details

  • Constructor Details

    • MemoryBasedAuditEventRepository

      public MemoryBasedAuditEventRepository()
      Constructor setting up a memory based AuditEventRepository that logs all events and has a capacity of 1000.
    • MemoryBasedAuditEventRepository

      public MemoryBasedAuditEventRepository(Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter)
      Constructor setting up a memory based AuditEventRepository that logs events determined by the supplied filter and has a capacity of 1000.
      Parameters:
      filter - for determining which events to log
    • MemoryBasedAuditEventRepository

      public MemoryBasedAuditEventRepository(Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter, int capacity)
      Constructor setting up a memory based AuditEventRepository that logs events determined by the supplied filter and has a capacity given by capacity.
      Parameters:
      filter - for determining which events to log
      capacity - the capacity for the number of events that should be saved
  • Method Details

    • addEvent

      protected void addEvent(org.springframework.boot.actuate.audit.AuditEvent event)
      Logs an event.
      Specified by:
      addEvent in class FilteringAuditEventRepository
      Parameters:
      event - the audit event to log
    • find

      public List<org.springframework.boot.actuate.audit.AuditEvent> find(String principal, Instant after, String type)