io.logspace.agent.shaded.quartz.JobDetail Maven / Gradle / Ivy
/*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
*/
package io.logspace.agent.shaded.quartz;
import java.io.Serializable;
/**
* Conveys the detail properties of a given Job
instance. JobDetails are
* to be created/defined with {@link JobBuilder}.
*
*
* Quartz does not store an actual instance of a Job
class, but
* instead allows you to define an instance of one, through the use of a JobDetail
.
*
*
*
* Job
s have a name and group associated with them, which
* should uniquely identify them within a single {@link Scheduler}
.
*
*
*
* Trigger
s are the 'mechanism' by which Job
s
* are scheduled. Many Trigger
s can point to the same Job
,
* but a single Trigger
can only point to one Job
.
*
*
* @see JobBuilder
* @see Job
* @see JobDataMap
* @see Trigger
*
* @author James House
*/
public interface JobDetail extends Serializable, Cloneable {
public JobKey getKey();
/**
*
* Return the description given to the Job
instance by its
* creator (if any).
*
*
* @return null if no description was set.
*/
public String getDescription();
/**
*
* Get the instance of Job
that will be executed.
*
*/
public Class extends Job> getJobClass();
/**
*
* Get the JobDataMap
that is associated with the Job
.
*
*/
public JobDataMap getJobDataMap();
/**
*
* Whether or not the Job
should remain stored after it is
* orphaned (no {@link Trigger}s
point to it).
*
*
*
* If not explicitly set, the default value is false
.
*
*
* @return true
if the Job should remain persisted after
* being orphaned.
*/
public boolean isDurable();
/**
* @see PersistJobDataAfterExecution
* @return whether the associated Job class carries the {@link PersistJobDataAfterExecution} annotation.
*/
public boolean isPersistJobDataAfterExecution();
/**
* @see DisallowConcurrentExecution
* @return whether the associated Job class carries the {@link DisallowConcurrentExecution} annotation.
*/
public boolean isConcurrentExectionDisallowed();
/**
*
* Instructs the Scheduler
whether or not the Job
* should be re-executed if a 'recovery' or 'fail-over' situation is
* encountered.
*
*
*
* If not explicitly set, the default value is false
.
*
*
* @see JobExecutionContext#isRecovering()
*/
public boolean requestsRecovery();
public Object clone();
/**
* Get a {@link JobBuilder} that is configured to produce a
* JobDetail
identical to this one.
*/
public JobBuilder getJobBuilder();
}