Class InfluxDbClientService

java.lang.Object
org.lsst.ccs.services.InfluxDbClientService
All Implemented Interfaces:
ServiceLifecycle, AgentService

public class InfluxDbClientService extends Object implements AgentService, ServiceLifecycle
An AgentService to be used by Agents that need to interact with the Rest Server on the buses. Connections can be established by either creating a custom connection to a known host:port combination or by listening to the buses for available rest services.
Author:
The LSST CCS Team
  • Constructor Details

    • InfluxDbClientService

      public InfluxDbClientService()
  • Method Details

    • getAgentServiceName

      public String getAgentServiceName()
      Description copied from interface: AgentService
      Get the name of this service. This name will be used to add the given service to the lookup tree.
      Specified by:
      getAgentServiceName in interface AgentService
      Returns:
      the AgentService name.
    • startForAgent

      public boolean startForAgent(AgentInfo agentInfo)
      Description copied from interface: AgentService
      This method is invoked after an agent service is created to see if this service is to be started for the tiven Agent.
      Specified by:
      startForAgent in interface AgentService
      Returns:
      true if the service is to be added to the given agent.
    • setEnabled

      @ConfigurationParameterChanger public void setEnabled(boolean enabled)
    • isEnabled

      public boolean isEnabled()
    • preStart

      public void preStart()
      Description copied from interface: ServiceLifecycle
      Called from the enclosing Subsystem when org.lsst.ccs.Subsystem#start() has been called.

      The preceding lifecycle step is HasLifecycle.postInit()

      The following lifecycle step is HasLifecycle.start() At the time it is called :

      • the PhaseState is INITIALIZING
      • connection with the messaging layer is effective, the enclosing subsystem has started StatusHeartBeat publication
      Specified by:
      preStart in interface ServiceLifecycle
    • preInit

      public void preInit()
      Specified by:
      preInit in interface ServiceLifecycle
    • preShutdown

      public void preShutdown()
      Specified by:
      preShutdown in interface ServiceLifecycle
    • write

      public void write(org.influxdb.dto.Point point)
    • write

      public void write(org.influxdb.dto.BatchPoints points)
    • getGlobalTags

      public Map<String,String> getGlobalTags()
    • createBatchPoints

      public org.influxdb.dto.BatchPoints createBatchPoints()