Package com.github.kagkarlsson.scheduler
Class SchedulerBuilder
java.lang.Object
com.github.kagkarlsson.scheduler.SchedulerBuilder
- Direct Known Subclasses:
TestHelper.ManualSchedulerBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Clockprotected booleanprotected final DataSourcestatic final Durationstatic final LogLevelstatic final Durationstatic final intstatic final Durationstatic final PollingStrategyConfigprotected Durationprotected ExecutorServiceprotected booleanprotected booleanprotected List<ExecutionInterceptor>protected ExecutorServiceprotected intprotected Durationprotected ScheduledExecutorServiceprotected JdbcCustomizationstatic final booleanprotected LogLevelprotected booleanprotected intprotected PollingStrategyConfigprotected booleanprotected List<SchedulerListener>protected SchedulerNameprotected Serializerstatic final Durationprotected Durationprotected StatsRegistryprotected Stringstatic final doubleprotected Waiter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExecutionInterceptor(ExecutionInterceptor interceptor) addSchedulerListener(SchedulerListener schedulerListener) build()commitWhenAutocommitDisabled(boolean commitWhenAutocommitDisabled) deleteUnresolvedAfter(Duration deleteAfter) dueExecutor(ExecutorService dueExecutor) executorService(ExecutorService executorService) failureLogging(LogLevel logLevel, boolean logStackTrace) heartbeatInterval(Duration duration) housekeeperExecutor(ScheduledExecutorService housekeeperExecutor) jdbcCustomization(JdbcCustomization jdbcCustomization) missedHeartbeatsLimit(int numberOfMissedHeartbeatsBeforeDead) pollingInterval(Duration pollingInterval) pollUsingFetchAndLockOnExecute(double lowerLimitFractionOfThreads, double executionsPerBatchFractionOfThreads) pollUsingLockAndFetch(double lowerLimitFractionOfThreads, double upperLimitFractionOfThreads) schedulerName(SchedulerName schedulerName) serializer(Serializer serializer) shutdownMaxWait(Duration shutdownMaxWait) <T extends Task<?> & OnStartup>
SchedulerBuilderstartTasks(List<T> startTasks) final <T extends Task<?> & OnStartup>
SchedulerBuilderstartTasks(T... startTasks) statsRegistry(StatsRegistry statsRegistry) Deprecated.threads(int numberOfThreads)
-
Field Details
-
UPPER_LIMIT_FRACTION_OF_THREADS_FOR_FETCH
public static final double UPPER_LIMIT_FRACTION_OF_THREADS_FOR_FETCH- See Also:
-
DEFAULT_POLLING_INTERVAL
-
DEFAULT_HEARTBEAT_INTERVAL
-
DEFAULT_MISSED_HEARTBEATS_LIMIT
public static final int DEFAULT_MISSED_HEARTBEATS_LIMIT- See Also:
-
DEFAULT_DELETION_OF_UNRESOLVED_TASKS_DURATION
-
SHUTDOWN_MAX_WAIT
-
DEFAULT_POLLING_STRATEGY
-
DEFAULT_FAILURE_LOG_LEVEL
-
LOG_STACK_TRACE_ON_FAILURE
public static final boolean LOG_STACK_TRACE_ON_FAILURE- See Also:
-
dataSource
-
knownTasks
-
startTasks
-
clock
-
schedulerName
-
executorThreads
protected int executorThreads -
waiter
-
statsRegistry
-
heartbeatInterval
-
serializer
-
tableName
-
enableImmediateExecution
protected boolean enableImmediateExecution -
executorService
-
dueExecutor
-
housekeeperExecutor
-
deleteUnresolvedAfter
-
jdbcCustomization
-
shutdownMaxWait
-
commitWhenAutocommitDisabled
protected boolean commitWhenAutocommitDisabled -
pollingStrategyConfig
-
logLevel
-
logStackTrace
protected boolean logStackTrace -
enablePriority
protected boolean enablePriority -
registerShutdownHook
protected boolean registerShutdownHook -
numberOfMissedHeartbeatsBeforeDead
protected int numberOfMissedHeartbeatsBeforeDead -
alwaysPersistTimestampInUTC
protected boolean alwaysPersistTimestampInUTC -
schedulerListeners
-
executionInterceptors
-
-
Constructor Details
-
SchedulerBuilder
-
-
Method Details
-
startTasks
@SafeVarargs public final <T extends Task<?> & OnStartup> SchedulerBuilder startTasks(T... startTasks) -
startTasks
-
pollingInterval
-
heartbeatInterval
-
missedHeartbeatsLimit
-
threads
-
executorService
-
dueExecutor
-
housekeeperExecutor
-
statsRegistry
Deprecated.Deprecated, use addSchedulerListener instead -
addSchedulerListener
-
addExecutionInterceptor
-
schedulerName
-
serializer
-
tableName
-
enableImmediateExecution
-
deleteUnresolvedAfter
-
jdbcCustomization
-
alwaysPersistTimestampInUTC
-
shutdownMaxWait
-
commitWhenAutocommitDisabled
-
pollUsingFetchAndLockOnExecute
public SchedulerBuilder pollUsingFetchAndLockOnExecute(double lowerLimitFractionOfThreads, double executionsPerBatchFractionOfThreads) -
pollUsingLockAndFetch
public SchedulerBuilder pollUsingLockAndFetch(double lowerLimitFractionOfThreads, double upperLimitFractionOfThreads) -
failureLogging
-
registerShutdownHook
-
enablePriority
-
build
-