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
-
Method Summary
Modifier and TypeMethodDescriptionagentMetadata
(GenieHostInfo genieHostInfo) Provide a lazy bean definition forAgentMetadata
if none already exists.Provide a lazyFileLockFactory
.Provide a bean of typeGenieHostInfo
if none already exists.org.springframework.scheduling.TaskScheduler
heartBeatServiceTaskScheduler
(AgentProperties agentProperties) Provide a lazyTaskScheduler
bean for use by the heart beat service is none has already been defined in the context.org.springframework.core.task.AsyncTaskExecutor
sharedAgentTaskExecutor
(AgentProperties agentProperties) Get a lazyAsyncTaskExecutor
bean which may be shared by different components if one isn't already defined.org.springframework.scheduling.TaskScheduler
sharedAgentTaskScheduler
(AgentProperties agentProperties) Provide a lazyTaskScheduler
to 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 typeGenieHostInfo
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 forAgentMetadata
if none already exists.- Parameters:
genieHostInfo
- the host information- Returns:
- A
AgentMetadataImpl
instance
-
fileLockFactory
Provide a lazyFileLockFactory
.- Returns:
- A
FileLockFactory
instance
-
heartBeatServiceTaskScheduler
@Bean @Lazy @ConditionalOnMissingBean(name="heartBeatServiceTaskScheduler") public org.springframework.scheduling.TaskScheduler heartBeatServiceTaskScheduler(AgentProperties agentProperties) Provide a lazyTaskScheduler
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
-