Package com.embabel.agent.spi.support
Class InMemoryContextRepository
-
- All Implemented Interfaces:
-
com.embabel.agent.spi.ContextRepository
public final class InMemoryContextRepository implements ContextRepository
In-memory implementation of ContextRepository with configurable window size to prevent memory overflow by evicting the oldest entries when the limit is reached.
-
-
Constructor Summary
Constructors Constructor Description InMemoryContextRepository(ContextRepositoryProperties properties)
-
Method Summary
Modifier and Type Method Description Contextcreate()Create an empty context. ContextfindById(String id)Contextsave(Context context)Unitdelete(Context context)final Integersize()Get current size of the repository for testing purposes. final Unitclear()Clear all entries from the repository for testing purposes. -
-
Constructor Detail
-
InMemoryContextRepository
InMemoryContextRepository(ContextRepositoryProperties properties)
-
-
-
-