Package org.jobrunr.server
Class BackgroundJobServerConfiguration
- java.lang.Object
-
- org.jobrunr.server.BackgroundJobServerConfiguration
-
public class BackgroundJobServerConfiguration extends java.lang.Object
This class allows to configure the BackgroundJobServer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BackgroundJobServerConfiguration
andPollIntervalInSeconds(int pollIntervalInSeconds)
Allows to set the pollIntervalInSeconds for the BackgroundJobServerBackgroundJobServerConfiguration
andWorkerCount(int workerCount)
Allows to set the workerCount for the BackgroundJobServer which defines the maximum number of jobs that will be run in parallelBackgroundJobServerConfiguration
andWorkerCountPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy)
static BackgroundJobServerConfiguration
usingStandardBackgroundJobServerConfiguration()
This returns the default configuration with the BackgroundJobServer with a poll interval of 15 seconds and a worker count based on the CPU
-
-
-
Method Detail
-
usingStandardBackgroundJobServerConfiguration
public static BackgroundJobServerConfiguration usingStandardBackgroundJobServerConfiguration()
This returns the default configuration with the BackgroundJobServer with a poll interval of 15 seconds and a worker count based on the CPU- Returns:
- the default JobRunrDashboard configuration
-
andPollIntervalInSeconds
public BackgroundJobServerConfiguration andPollIntervalInSeconds(int pollIntervalInSeconds)
Allows to set the pollIntervalInSeconds for the BackgroundJobServer- Parameters:
pollIntervalInSeconds
- the pollIntervalInSeconds- Returns:
- the same configuration instance which provides a fluent api
-
andWorkerCount
public BackgroundJobServerConfiguration andWorkerCount(int workerCount)
Allows to set the workerCount for the BackgroundJobServer which defines the maximum number of jobs that will be run in parallel- Parameters:
workerCount
- the workerCount for the BackgroundJobServer- Returns:
- the same configuration instance which provides a fluent api
-
andWorkerCountPolicy
public BackgroundJobServerConfiguration andWorkerCountPolicy(BackgroundJobServerWorkerPolicy backgroundJobServerWorkerPolicy)
-
-