public class AgentConnectionTrackingServiceImpl extends java.lang.Object implements AgentConnectionTrackingService, org.springframework.boot.actuate.info.InfoContributor
AgentRoutingService
of connected/disconnected agents while hiding details of connections, disconnections, missed heartbeats.| Constructor and Description |
|---|
AgentConnectionTrackingServiceImpl(AgentRoutingService agentRoutingService,
org.springframework.scheduling.TaskScheduler taskScheduler,
AgentConnectionTrackingServiceProperties serviceProperties)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
contribute(org.springframework.boot.actuate.info.Info.Builder builder) |
long |
getConnectedAgentsCount()
Get the count of locally connected agents.
|
void |
notifyDisconnected(java.lang.String streamId,
java.lang.String claimedJobId)
Handle a disconnection.
|
void |
notifyHeartbeat(java.lang.String streamId,
java.lang.String claimedJobId)
Handle a heartbeat.
|
public AgentConnectionTrackingServiceImpl(AgentRoutingService agentRoutingService, org.springframework.scheduling.TaskScheduler taskScheduler, AgentConnectionTrackingServiceProperties serviceProperties)
agentRoutingService - the agent routing servicetaskScheduler - the task schedulerserviceProperties - the service propertiespublic void notifyHeartbeat(java.lang.String streamId,
java.lang.String claimedJobId)
notifyHeartbeat in interface AgentConnectionTrackingServicestreamId - the unique id of the connectionclaimedJobId - the job id claimed by the agentpublic void notifyDisconnected(java.lang.String streamId,
java.lang.String claimedJobId)
notifyDisconnected in interface AgentConnectionTrackingServicestreamId - the unique id of the connectionclaimedJobId - the job id claimed by the agentpublic long getConnectedAgentsCount()
getConnectedAgentsCount in interface AgentConnectionTrackingServicepublic void contribute(org.springframework.boot.actuate.info.Info.Builder builder)
contribute in interface org.springframework.boot.actuate.info.InfoContributor