Package com.wavefront.agent
Class ProxyCheckInScheduler
- java.lang.Object
-
- com.wavefront.agent.ProxyCheckInScheduler
-
public class ProxyCheckInScheduler extends Object
Registers the proxy with the back-end, sets up regular "check-ins" (every minute), transmits proxy metrics to the back-end.- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description ProxyCheckInScheduler(UUID proxyId, ProxyConfig proxyConfig, APIContainer apiContainer, Consumer<com.wavefront.api.agent.AgentConfiguration> agentConfigurationConsumer, Runnable shutdownHook)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSuccessfulCheckinCount()
Returns the number of successful check-ins.void
scheduleCheckins()
Set up and schedule regular check-ins.void
shutdown()
Stops regular check-ins.
-
-
-
Constructor Detail
-
ProxyCheckInScheduler
public ProxyCheckInScheduler(UUID proxyId, ProxyConfig proxyConfig, APIContainer apiContainer, Consumer<com.wavefront.api.agent.AgentConfiguration> agentConfigurationConsumer, Runnable shutdownHook)
- Parameters:
proxyId
- Proxy UUID.proxyConfig
- Proxy settings.apiContainer
- API container object.agentConfigurationConsumer
- Configuration processor, invoked after each successful configuration fetch.shutdownHook
- Invoked when proxy receives a shutdown directive from the back-end.
-
-
Method Detail
-
scheduleCheckins
public void scheduleCheckins()
Set up and schedule regular check-ins.
-
getSuccessfulCheckinCount
public long getSuccessfulCheckinCount()
Returns the number of successful check-ins.- Returns:
- true if this proxy had at least one successful check-in.
-
shutdown
public void shutdown()
Stops regular check-ins.
-
-