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

net.nemerosa.ontrack.job.Job Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.job;

import org.jetbrains.annotations.Nullable;

import java.time.Duration;

public interface Job {

    /**
     * Key of the job
     */
    JobKey getKey();

    /**
     * Task to be run by the job
     */
    JobRun getTask();

    /**
     * Gets a description for the job
     */
    String getDescription();

    /**
     * Is the job disabled for the next run?
     */
    boolean isDisabled();

    /**
     * Optional timeout for running this job.
     * 

* If null (the default), no timeout is defined by the job but general settings may apply. */ default @Nullable Duration getTimeout() { return null; } /** * This method is called to see if the job is still valid. It is called prior any execution * and when collecting the job status. By default, returns true. *

* For example, jobs which depend on properties or configurations, can just test the existence of the property * or configuration. */ default boolean isValid() { return true; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy