Class CommonServicesAutoConfiguration
- java.lang.Object
-
- com.netflix.genie.common.internal.configs.CommonServicesAutoConfiguration
-
@Configuration @EnableConfigurationProperties(RegexDirectoryManifestProperties.class) public class CommonServicesAutoConfiguration extends java.lang.Object
Auto configuration of any services that are common to both the agent and the server.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
FILE_SYSTEM_JOB_ARCHIVER_PRECEDENCE
Constant allowing developers to reference the precedence in their own configuration files.
-
Constructor Summary
Constructors Constructor Description CommonServicesAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectoryManifest.Factory
directoryManifestFactory(DirectoryManifest.Filter directoryManifestFilter)
Provide aDirectoryManifest.Factory
if no override is defined.DirectoryManifest.Filter
directoryManifestFilter(RegexDirectoryManifestProperties properties)
Provide aDirectoryManifest.Filter
that filters files and/or prunes directories based on a set of regular expression patterns provided via properties.FileSystemJobArchiverImpl
fileSystemJobArchiver()
Provide aJobArchiver
implementation that will copy from one place on the filesystem to another.JobArchiveService
jobArchiveService(java.util.List<JobArchiver> jobArchivers, DirectoryManifest.Factory directoryManifestFactory)
Provide a defaultJobArchiveService
if no override is defined.com.github.benmanes.caffeine.cache.Cache<java.nio.file.Path,DirectoryManifest>
jobDirectoryManifestCache()
Provide aCache<Path, DirectoryManifest>
named "jobDirectoryManifestCache" if no override is defined.JobDirectoryManifestCreatorServiceImpl
jobDirectoryManifestCreatorService(DirectoryManifest.Factory directoryManifestFactory, com.github.benmanes.caffeine.cache.Cache<java.nio.file.Path,DirectoryManifest> cache)
Provide aJobDirectoryManifestCreatorService
if no override is defined.PropertiesMapCache.Factory
propertiesMapCacheFactory(org.springframework.core.env.Environment environment)
Provide aPropertiesMapCache.Factory
if no override is defined.
-
-
-
Field Detail
-
FILE_SYSTEM_JOB_ARCHIVER_PRECEDENCE
public static final int FILE_SYSTEM_JOB_ARCHIVER_PRECEDENCE
Constant allowing developers to reference the precedence in their own configuration files.- See Also:
Ordered
, Constant Field Values
-
-
Method Detail
-
fileSystemJobArchiver
@Bean @Order(2147483627) public FileSystemJobArchiverImpl fileSystemJobArchiver()
Provide aJobArchiver
implementation that will copy from one place on the filesystem to another.- Returns:
- A
FileSystemJobArchiverImpl
instance
-
jobArchiveService
@Bean @ConditionalOnMissingBean(JobArchiveService.class) public JobArchiveService jobArchiveService(java.util.List<JobArchiver> jobArchivers, DirectoryManifest.Factory directoryManifestFactory)
Provide a defaultJobArchiveService
if no override is defined.- Parameters:
jobArchivers
- The ordered availableJobArchiver
implementations in the systemdirectoryManifestFactory
- the job directory manifest factory- Returns:
- A
JobArchiveServiceImpl
instance
-
jobDirectoryManifestCreatorService
@Bean @ConditionalOnMissingBean(JobDirectoryManifestCreatorService.class) public JobDirectoryManifestCreatorServiceImpl jobDirectoryManifestCreatorService(DirectoryManifest.Factory directoryManifestFactory, @Qualifier("jobDirectoryManifestCache") com.github.benmanes.caffeine.cache.Cache<java.nio.file.Path,DirectoryManifest> cache)
Provide aJobDirectoryManifestCreatorService
if no override is defined. The manifest produced by this service do not include checksum for entries and caches manifests recently created.- Parameters:
directoryManifestFactory
- the factory to produce the manifest if neededcache
- the cache to use- Returns:
- a
JobDirectoryManifestCreatorService
-
jobDirectoryManifestCache
@Bean(name="jobDirectoryManifestCache") @ConditionalOnMissingBean(name="jobDirectoryManifestCache") public com.github.benmanes.caffeine.cache.Cache<java.nio.file.Path,DirectoryManifest> jobDirectoryManifestCache()
Provide aCache<Path, DirectoryManifest>
named "jobDirectoryManifestCache" if no override is defined.- Returns:
- a
Cache
-
directoryManifestFactory
@Bean @ConditionalOnMissingBean(Factory.class) public DirectoryManifest.Factory directoryManifestFactory(DirectoryManifest.Filter directoryManifestFilter)
Provide aDirectoryManifest.Factory
if no override is defined.- Parameters:
directoryManifestFilter
- the filter used during manifest creation- Returns:
- a directory manifest factory
-
directoryManifestFilter
@Bean @ConditionalOnMissingBean(Filter.class) public DirectoryManifest.Filter directoryManifestFilter(RegexDirectoryManifestProperties properties)
Provide aDirectoryManifest.Filter
that filters files and/or prunes directories based on a set of regular expression patterns provided via properties.- Parameters:
properties
- the properties- Returns:
- a directory manifest filter
-
propertiesMapCacheFactory
@Bean @ConditionalOnMissingBean(Factory.class) public PropertiesMapCache.Factory propertiesMapCacheFactory(org.springframework.core.env.Environment environment)
Provide aPropertiesMapCache.Factory
if no override is defined.- Parameters:
environment
- the environment- Returns:
- a properties map cache factory
-
-