Class AgentAutoConfiguration

java.lang.Object
com.netflix.genie.agent.spring.autoconfigure.AgentAutoConfiguration

@Configuration @EnableConfigurationProperties(AgentProperties.class) public class AgentAutoConfiguration extends Object
Configuration for various agent beans.
Since:
4.0.0
  • Constructor Details

    • AgentAutoConfiguration

      public AgentAutoConfiguration()
  • Method Details

    • genieAgentHostInfo

      @Bean @ConditionalOnMissingBean(GenieHostInfo.class) public GenieHostInfo genieAgentHostInfo() throws UnknownHostException
      Provide a bean of type GenieHostInfo if none already exists.
      Returns:
      A GenieHostInfo instance
      Throws:
      UnknownHostException - if hostname cannot be determined
    • agentMetadata

      @Bean @Lazy @ConditionalOnMissingBean(AgentMetadata.class) public AgentMetadataImpl agentMetadata(GenieHostInfo genieHostInfo)
      Provide a lazy bean definition for AgentMetadata if none already exists.
      Parameters:
      genieHostInfo - the host information
      Returns:
      A AgentMetadataImpl instance
    • fileLockFactory

      @Bean @Lazy public FileLockFactory fileLockFactory()
      Provide a lazy FileLockFactory.
      Returns:
      A FileLockFactory instance
    • sharedAgentTaskExecutor

      @Bean @Lazy @ConditionalOnMissingBean(name="sharedAgentTaskExecutor", value=org.springframework.core.task.AsyncTaskExecutor.class) public org.springframework.core.task.AsyncTaskExecutor sharedAgentTaskExecutor(AgentProperties agentProperties)
      Get a lazy AsyncTaskExecutor bean which may be shared by different components if one isn't already defined.
      Parameters:
      agentProperties - the agent properties
      Returns:
      A ThreadPoolTaskExecutor instance
    • sharedAgentTaskScheduler

      @Bean @Lazy @ConditionalOnMissingBean(name="sharedAgentTaskScheduler") public org.springframework.scheduling.TaskScheduler sharedAgentTaskScheduler(AgentProperties agentProperties)
      Provide a lazy TaskScheduler to be used by the Agent process if one isn't already defined.
      Parameters:
      agentProperties - the agent properties
      Returns:
      A ThreadPoolTaskScheduler instance
    • heartBeatServiceTaskScheduler

      @Bean @Lazy @ConditionalOnMissingBean(name="heartBeatServiceTaskScheduler") public org.springframework.scheduling.TaskScheduler heartBeatServiceTaskScheduler(AgentProperties agentProperties)
      Provide a lazy TaskScheduler bean for use by the heart beat service is none has already been defined in the context.
      Parameters:
      agentProperties - the agent properties
      Returns:
      A TaskScheduler that the heart beat service should use