public class InMemoryAuditEventRepository extends Object implements AuditEventRepository
AuditEventRepository
implementation.Constructor and Description |
---|
InMemoryAuditEventRepository() |
InMemoryAuditEventRepository(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
add(AuditEvent event)
Log an event.
|
List<AuditEvent> |
find(Date after)
Find audit events since the time provided.
|
List<AuditEvent> |
find(String principal,
Date after)
Find audit events relating to the specified principal since the time provided.
|
List<AuditEvent> |
find(String principal,
Date after,
String type)
Find audit events of specified type relating to the specified principal since the
time provided.
|
void |
setCapacity(int capacity)
Set the capacity of this event repository.
|
public InMemoryAuditEventRepository()
public InMemoryAuditEventRepository(int capacity)
public void setCapacity(int capacity)
capacity
- the capacitypublic void add(AuditEvent event)
AuditEventRepository
add
in interface AuditEventRepository
event
- the audit event to logpublic List<AuditEvent> find(Date after)
AuditEventRepository
find
in interface AuditEventRepository
after
- timestamp of earliest result required (or null
if
unrestricted)public List<AuditEvent> find(String principal, Date after)
AuditEventRepository
find
in interface AuditEventRepository
principal
- the principal name to search for (or null
if unrestricted)after
- timestamp of earliest result required (or null
if
unrestricted)public List<AuditEvent> find(String principal, Date after, String type)
AuditEventRepository
find
in interface AuditEventRepository
principal
- the principal name to search for (or null
if unrestricted)after
- timestamp of earliest result required (or null
if
unrestricted)type
- the event type to search for (or null
if unrestricted)Copyright © 2019 Pivotal Software, Inc.. All rights reserved.