![JAR search and dependency download from the Maven repository](/logo.png)
com.github.ltsopensource.spring.boot.JobTrackerAutoConfiguration Maven / Gradle / Ivy
package com.github.ltsopensource.spring.boot;
import com.github.ltsopensource.core.cluster.AbstractJobNode;
import com.github.ltsopensource.core.cluster.NodeType;
import com.github.ltsopensource.jobtracker.JobTracker;
import com.github.ltsopensource.jobtracker.JobTrackerBuilder;
import com.github.ltsopensource.spring.boot.annotation.EnableJobTracker;
import com.github.ltsopensource.spring.boot.properties.JobTrackerProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @author Robert HG ([email protected]) on 4/9/16.
*/
@Configuration
@ConditionalOnBean(annotation = EnableJobTracker.class)
@EnableConfigurationProperties(JobTrackerProperties.class)
public class JobTrackerAutoConfiguration extends AbstractAutoConfiguration {
@Autowired(required = false)
private JobTrackerProperties properties;
private JobTracker jobTracker;
@Override
protected void initJobNode() {
jobTracker = JobTrackerBuilder.buildByProperties(properties);
}
@Override
protected NodeType nodeType() {
return NodeType.JOB_TRACKER;
}
@Override
protected AbstractJobNode getJobNode() {
return jobTracker;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy