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
An in-memory
AuditEventRepository
that adds filtering support (compared to
InMemoryAuditEventRepository
).- Author:
- Martin Lindström
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructor setting up a memory basedAuditEventRepository
that logs all events and has a capacity of 1000.MemoryBasedAuditEventRepository
(Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter) Constructor setting up a memory basedAuditEventRepository
that logs events determined by the supplied filter and has a capacity of 1000.MemoryBasedAuditEventRepository
(Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter, int capacity) Constructor setting up a memory basedAuditEventRepository
that logs events determined by the supplied filter and has a capacity given bycapacity
. -
Method Summary
Methods inherited from class se.swedenconnect.spring.saml.idp.audit.repository.FilteringAuditEventRepository
add, exclusionPredicate, inclusionExclusionPredicate, inclusionPredicate
-
Field Details
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY- See Also:
-
-
Constructor Details
-
MemoryBasedAuditEventRepository
public MemoryBasedAuditEventRepository()Constructor setting up a memory basedAuditEventRepository
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 basedAuditEventRepository
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 basedAuditEventRepository
that logs events determined by the supplied filter and has a capacity given bycapacity
.- Parameters:
filter
- for determining which events to logcapacity
- 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 classFilteringAuditEventRepository
- Parameters:
event
- the audit event to log
-
find
-