Package com.embabel.agent.spi.support
Class InMemoryAgentProcessRepository
-
- All Implemented Interfaces:
-
com.embabel.agent.core.AgentProcessRepository
public final class InMemoryAgentProcessRepository implements AgentProcessRepository
In-memory implementation of AgentProcessRepository with configurable window size to prevent memory overflow by evicting the oldest entries when the limit is reached.
-
-
Constructor Summary
Constructors Constructor Description InMemoryAgentProcessRepository(ProcessRepositoryProperties properties)
-
Method Summary
Modifier and Type Method Description AgentProcessfindById(String id)AgentProcesssave(AgentProcess agentProcess)Save a new agent process. Unitupdate(AgentProcess agentProcess)Update an existing agent process. Unitdelete(AgentProcess agentProcess)final Integersize()Get current size of the repository for testing purposes. final Unitclear()Clear all entries from the repository for testing purposes. -
-
Constructor Detail
-
InMemoryAgentProcessRepository
InMemoryAgentProcessRepository(ProcessRepositoryProperties properties)
-
-
Method Detail
-
findById
AgentProcess findById(String id)
-
save
AgentProcess save(AgentProcess agentProcess)
Save a new agent process.
-
update
Unit update(AgentProcess agentProcess)
Update an existing agent process.
-
delete
Unit delete(AgentProcess agentProcess)
-
-
-
-