Class JdbcAgentDiscovery
java.lang.Object
dev.agenor.adapters.persistence.directory.JdbcAgentDiscovery
- All Implemented Interfaces:
AgentDiscovery
JDBC implementation of
AgentDiscovery.- Since:
- 0.22.0
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcAgentDiscovery(JdbcHelper helper) JdbcAgentDiscovery(JdbcHelper helper, AgenorTelemetry telemetry) -
Method Summary
Modifier and TypeMethodDescriptionfindAgents(AgentQuery query, PageRequest request) Finds agents matching the given query, returning a bounded page of results.findByCapability(String capability) Finds all agents that declare the given capability.Finds an agent by its unique identifier.findByType(String agentType) Finds all agents of the given type.
-
Constructor Details
-
JdbcAgentDiscovery
-
JdbcAgentDiscovery
- Parameters:
helper- JDBC helper; must not be nulltelemetry- telemetry fordirectory.findspans; null treated as noop
-
-
Method Details
-
findById
Description copied from interface:AgentDiscoveryFinds an agent by its unique identifier.- Specified by:
findByIdin interfaceAgentDiscovery- Parameters:
agentId- the unique identifier, must not be null- Returns:
- a future containing the descriptor if found, or empty if not registered
-
findByCapability
Description copied from interface:AgentDiscoveryFinds all agents that declare the given capability.- Specified by:
findByCapabilityin interfaceAgentDiscovery- Parameters:
capability- the capability tag, must not be null- Returns:
- a future containing a (possibly empty) list of matching descriptors
-
findByType
Description copied from interface:AgentDiscoveryFinds all agents of the given type.- Specified by:
findByTypein interfaceAgentDiscovery- Parameters:
agentType- the agent type string, must not be null- Returns:
- a future containing a (possibly empty) list of matching descriptors
-
findAgents
Description copied from interface:AgentDiscoveryFinds agents matching the given query, returning a bounded page of results.Use
AgentQuery.all()to retrieve all agents with pagination.- Specified by:
findAgentsin interfaceAgentDiscovery- Parameters:
query- the search criteria, must not be nullrequest- pagination parameters, must not be null- Returns:
- a future containing the page of matching descriptors
-