@Transactional public class JpaAgentConnectionPersistenceServiceImpl extends java.lang.Object implements AgentConnectionPersistenceService
| Constructor and Description |
|---|
JpaAgentConnectionPersistenceServiceImpl(JpaAgentConnectionRepository agentConnectionRepository)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.String> |
lookupAgentConnectionServer(@NotBlank java.lang.String jobId)
Lookup the hostname/address of the server with an active connection to a given agent.
|
void |
removeAgentConnection(@NotBlank java.lang.String jobId,
@NotBlank java.lang.String hostname)
Remove an existing connection currently active from the given agent to the local node.
|
void |
saveAgentConnection(@NotBlank java.lang.String jobId,
@NotBlank java.lang.String hostname)
Store a new connection currently active from the given agent to the given node.
|
public JpaAgentConnectionPersistenceServiceImpl(JpaAgentConnectionRepository agentConnectionRepository)
agentConnectionRepository - agent connection repositorypublic void saveAgentConnection(@NotBlank
@NotBlank java.lang.String jobId,
@NotBlank
@NotBlank java.lang.String hostname)
saveAgentConnection in interface AgentConnectionPersistenceServicejobId - the id of a job the agent is runninghostname - the server owning the connectionpublic void removeAgentConnection(@NotBlank
@NotBlank java.lang.String jobId,
@NotBlank
@NotBlank java.lang.String hostname)
removeAgentConnection in interface AgentConnectionPersistenceServicejobId - the id of a job the agent is runninghostname - the hostname expected to be associated to the connection@Transactional(readOnly=true)
public java.util.Optional<java.lang.String> lookupAgentConnectionServer(@NotBlank
@NotBlank java.lang.String jobId)
lookupAgentConnectionServer in interface AgentConnectionPersistenceServicejobId - the id of a job the agent is running