Class AgentServicesAutoConfiguration
- java.lang.Object
-
- com.netflix.genie.web.spring.autoconfigure.agent.services.AgentServicesAutoConfiguration
-
@Configuration @EnableConfigurationProperties({AgentConfigurationProperties.class,AgentRoutingServiceProperties.class,AgentConnectionTrackingServiceProperties.class}) public class AgentServicesAutoConfiguration extends java.lang.Object
Auto configuration for services needed in the agent module.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description AgentServicesAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentConfigurationServiceImpl
agentConfigurationService(AgentConfigurationProperties agentConfigurationProperties, PropertiesMapCache.Factory propertiesMapCacheFactory, io.micrometer.core.instrument.MeterRegistry registry)
Provide aAgentConfigurationService
if one is not defined.AgentConnectionTrackingService
agentConnectionTrackingService(AgentRoutingService agentRoutingService, org.springframework.scheduling.TaskScheduler taskScheduler, AgentConnectionTrackingServiceProperties serviceProperties)
Get an implementation ofAgentConnectionTrackingService
if one hasn't already been defined.AgentFilterServiceImpl
agentFilterService(java.util.List<AgentMetadataInspector> agentMetadataInspectorsList)
AAgentFilterService
implementation that federates the decision to a set ofAgentMetadataInspector
s.AgentJobServiceImpl
agentJobService(DataServices dataServices, JobResolverService jobResolverService, AgentFilterService agentFilterService, AgentConfigurationService agentConfigurationService, io.micrometer.core.instrument.MeterRegistry meterRegistry)
Get aAgentJobService
instance if there isn't already one.AgentRoutingService
agentRoutingServiceCurator(GenieHostInfo genieHostInfo, org.apache.curator.x.discovery.ServiceDiscovery<AgentRoutingServiceCuratorDiscoveryImpl.Agent> serviceDiscovery, org.springframework.scheduling.TaskScheduler taskScheduler, org.apache.curator.framework.listen.Listenable<org.apache.curator.framework.state.ConnectionStateListener> listenableCuratorConnectionState, io.micrometer.core.instrument.MeterRegistry registry, AgentRoutingServiceProperties properties)
Get an implementation ofAgentRoutingService
if one hasn't already been defined.AgentRoutingService
agentRoutingServiceSingleNodeImpl(GenieHostInfo genieHostInfo)
Get an implementation ofAgentRoutingService
if one hasn't already been defined.
-
-
-
Method Detail
-
agentJobService
@Bean @ConditionalOnMissingBean(AgentJobService.class) public AgentJobServiceImpl agentJobService(DataServices dataServices, JobResolverService jobResolverService, AgentFilterService agentFilterService, AgentConfigurationService agentConfigurationService, io.micrometer.core.instrument.MeterRegistry meterRegistry)
Get aAgentJobService
instance if there isn't already one.- Parameters:
dataServices
- TheDataServices
instance to usejobResolverService
- The specification service to useagentFilterService
- The agent filter service to useagentConfigurationService
- The agent configuration servicemeterRegistry
- The metrics registry to use- Returns:
- An
AgentJobServiceImpl
instance.
-
agentConnectionTrackingService
@Bean @ConditionalOnMissingBean(AgentConnectionTrackingService.class) public AgentConnectionTrackingService agentConnectionTrackingService(AgentRoutingService agentRoutingService, @Qualifier("genieTaskScheduler") org.springframework.scheduling.TaskScheduler taskScheduler, AgentConnectionTrackingServiceProperties serviceProperties)
Get an implementation ofAgentConnectionTrackingService
if one hasn't already been defined.- Parameters:
agentRoutingService
- the agent routing servicetaskScheduler
- the task schedulerserviceProperties
- the service properties- Returns:
- A
AgentConnectionTrackingServiceImpl
instance
-
agentRoutingServiceSingleNodeImpl
@Bean @ConditionalOnMissingBean({AgentRoutingService.class,org.apache.curator.x.discovery.ServiceDiscovery.class}) public AgentRoutingService agentRoutingServiceSingleNodeImpl(GenieHostInfo genieHostInfo)
Get an implementation ofAgentRoutingService
if one hasn't already been defined. This bean is created if Zookeeper is disabled (single-node Genie deployments and tests).- Parameters:
genieHostInfo
- The local genie host information- Returns:
- A
AgentRoutingServiceSingleNodeImpl
instance
-
agentRoutingServiceCurator
@Bean @ConditionalOnBean(org.apache.curator.x.discovery.ServiceDiscovery.class) @ConditionalOnMissingBean(AgentRoutingService.class) public AgentRoutingService agentRoutingServiceCurator(GenieHostInfo genieHostInfo, org.apache.curator.x.discovery.ServiceDiscovery<AgentRoutingServiceCuratorDiscoveryImpl.Agent> serviceDiscovery, @Qualifier("genieTaskScheduler") org.springframework.scheduling.TaskScheduler taskScheduler, org.apache.curator.framework.listen.Listenable<org.apache.curator.framework.state.ConnectionStateListener> listenableCuratorConnectionState, io.micrometer.core.instrument.MeterRegistry registry, AgentRoutingServiceProperties properties)
Get an implementation ofAgentRoutingService
if one hasn't already been defined. This bean is created if Zookeeper is enabled, it uses Curator'sServiceDiscovery
.- Parameters:
genieHostInfo
- The local genie host informationserviceDiscovery
- The Zookeeper Curator service discoverytaskScheduler
- The task schedulerlistenableCuratorConnectionState
- the connection state listenableregistry
- The metrics registryproperties
- The service properties- Returns:
- A
AgentRoutingServiceCuratorDiscoveryImpl
instance
-
agentFilterService
@Bean @ConditionalOnMissingBean(AgentFilterService.class) public AgentFilterServiceImpl agentFilterService(java.util.List<AgentMetadataInspector> agentMetadataInspectorsList)
AAgentFilterService
implementation that federates the decision to a set ofAgentMetadataInspector
s.- Parameters:
agentMetadataInspectorsList
- the list of inspectors.- Returns:
- An
AgentFilterService
instance.
-
agentConfigurationService
@Bean @ConditionalOnMissingBean(AgentConfigurationService.class) public AgentConfigurationServiceImpl agentConfigurationService(AgentConfigurationProperties agentConfigurationProperties, PropertiesMapCache.Factory propertiesMapCacheFactory, io.micrometer.core.instrument.MeterRegistry registry)
Provide aAgentConfigurationService
if one is not defined.- Parameters:
agentConfigurationProperties
- the service propertiespropertiesMapCacheFactory
- the properties map cache factoryregistry
- the metrics registry- Returns:
- a
AgentConfigurationService
instance
-
-