Class InMemoryAuditRepository
java.lang.Object
com.iantapply.orchestra.audit.InMemoryAuditRepository
- All Implemented Interfaces:
AuditRepository
Thread-safe bounded audit repository for local operation and tests.
-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryAuditRepository(int capacity) Creates a repository that evicts the oldest entry when full. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(AuditEntry entry) Persists an audit entry.recent(int limit) Returns the most recent entries, newest first.
-
Constructor Details
-
InMemoryAuditRepository
public InMemoryAuditRepository(int capacity) Creates a repository that evicts the oldest entry when full.- Parameters:
capacity- maximum retained entries; values below one become one
-
-
Method Details
-
append
Description copied from interface:AuditRepositoryPersists an audit entry.- Specified by:
appendin interfaceAuditRepository- Parameters:
entry- entry to persist
-
recent
Description copied from interface:AuditRepositoryReturns the most recent entries, newest first.- Specified by:
recentin interfaceAuditRepository- Parameters:
limit- maximum number of entries- Returns:
- immutable or independently mutable result list
-