All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.lontime.extjobrunr.configuration.BackgroundJobServerOption Maven / Gradle / Ivy

package com.github.lontime.extjobrunr.configuration;

import java.time.Duration;

import lombok.Getter;
import lombok.Setter;

/**
 * BackgroundJobServerOption.
 * @author lontime
 * @since 1.0
 */
@Getter
@Setter
public class BackgroundJobServerOption {

    /**
     * Sets the workerCount for the BackgroundJobServer which defines the maximum number of jobs that will be run in parallel.
     * By default, this will be determined by the amount of available processor.
     */
    private Integer workerCount;

    /**
     * Set the pollIntervalInSeconds for the BackgroundJobServer to see whether new jobs need to be processed
     */
    private Integer pollIntervalInSeconds = 15;

    /**
     * Sets the duration to wait before changing jobs that are in the SUCCEEDED state to the DELETED state. If a duration suffix
     * is not specified, hours will be used.
     */
    private Duration deleteSucceededJobsAfter = Duration.ofHours(36);

    /**
     * Sets the duration to wait before permanently deleting jobs that are in the DELETED state. If a duration suffix
     * is not specified, hours will be used.
     */
    private Duration permanentlyDeleteDeletedJobsAfter = Duration.ofHours(72);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy