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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentMetadata(GenieHostInfo genieHostInfo) Provide a lazy bean definition forAgentMetadataif none already exists.Provide a lazyFileLockFactory.Provide a bean of typeGenieHostInfoif none already exists.org.springframework.scheduling.TaskSchedulerheartBeatServiceTaskScheduler(AgentProperties agentProperties) Provide a lazyTaskSchedulerbean for use by the heart beat service is none has already been defined in the context.org.springframework.core.task.AsyncTaskExecutorsharedAgentTaskExecutor(AgentProperties agentProperties) Get a lazyAsyncTaskExecutorbean which may be shared by different components if one isn't already defined.org.springframework.scheduling.TaskSchedulersharedAgentTaskScheduler(AgentProperties agentProperties) Provide a lazyTaskSchedulerto be used by the Agent process if one isn't already defined.
-
Constructor Details
-
AgentAutoConfiguration
public AgentAutoConfiguration()
-
-
Method Details
-
genieAgentHostInfo
@Bean @ConditionalOnMissingBean(GenieHostInfo.class) public GenieHostInfo genieAgentHostInfo() throws UnknownHostExceptionProvide a bean of typeGenieHostInfoif none already exists.- Returns:
- A
GenieHostInfoinstance - Throws:
UnknownHostException- if hostname cannot be determined
-
agentMetadata
@Bean @Lazy @ConditionalOnMissingBean(AgentMetadata.class) public AgentMetadataImpl agentMetadata(GenieHostInfo genieHostInfo) Provide a lazy bean definition forAgentMetadataif none already exists.- Parameters:
genieHostInfo- the host information- Returns:
- A
AgentMetadataImplinstance
-
fileLockFactory
Provide a lazyFileLockFactory.- Returns:
- A
FileLockFactoryinstance
-
heartBeatServiceTaskScheduler
@Bean @Lazy @ConditionalOnMissingBean(name="heartBeatServiceTaskScheduler") public org.springframework.scheduling.TaskScheduler heartBeatServiceTaskScheduler(AgentProperties agentProperties) Provide a lazyTaskSchedulerbean for use by the heart beat service is none has already been defined in the context.- Parameters:
agentProperties- the agent properties- Returns:
- A
TaskSchedulerthat the heart beat service should use
-