DelegatingLocalityJobDetail (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.locality Class DelegatingLocalityJobDetail

java.lang.Object
  extended by org.quartz.locality.DelegatingLocalityJobDetail
All Implemented Interfaces:
Serializable, Cloneable, JobDetail, LocalityAware, LocalityJobDetail

public class DelegatingLocalityJobDetail
extends Object
implements Cloneable, Serializable, LocalityJobDetail

Wrapping a JobDetail instance while adding the LocalityAware contract All JobDetail method calls will be delegated to the wrapped JobDetail instance

Author:
Alex Snaps
See Also:
Serialized Form

Constructor Summary
DelegatingLocalityJobDetail(JobDetail jobDetail, NodeSpec nodeSpec)
          Constructs a LocalityAware JobDetail, wrapping an existing JobDetail instance, with additional NodeSpec
 
Method Summary
 Object clone()
           
 String getDescription()
           Return the description given to the Job instance by its creator (if any).
 JobBuilder getJobBuilder()
          Get a JobBuilder that is configured to produce a JobDetail identical to this one.
 Class<? extends Job> getJobClass()
           Get the instance of Job that will be executed.
 JobDataMap getJobDataMap()
           Get the JobDataMap that is associated with the Job.
 JobKey getKey()
          
 NodeSpec getNodeSpec()
          Accessor to the NodeSpec instance to evaluate constraints
 boolean isConcurrentExectionDisallowed()
          
 boolean isDurable()
           Whether or not the Job should remain stored after it is orphaned (no Triggers point to it).
 boolean isPersistJobDataAfterExecution()
          
 boolean requestsRecovery()
           Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingLocalityJobDetail

public DelegatingLocalityJobDetail(JobDetail jobDetail,
                                   NodeSpec nodeSpec)
Constructs a LocalityAware JobDetail, wrapping an existing JobDetail instance, with additional NodeSpec

Parameters:
jobDetail - The JobDetail instance to wrap
nodeSpec - The NodeSpec instance

Method Detail

getKey

public JobKey getKey()

Specified by:
getKey in interface JobDetail

getDescription

public String getDescription()

Return the description given to the Job instance by its creator (if any).

Specified by:
getDescription in interface JobDetail
Returns:
null if no description was set.

getJobClass

public Class<? extends Job> getJobClass()

Get the instance of Job that will be executed.

Specified by:
getJobClass in interface JobDetail

getJobDataMap

public JobDataMap getJobDataMap()

Get the JobDataMap that is associated with the Job.

Specified by:
getJobDataMap in interface JobDetail

isDurable

public boolean isDurable()

Whether or not the Job should remain stored after it is orphaned (no Triggers point to it).

If not explicitly set, the default value is false.

Specified by:
isDurable in interface JobDetail
Returns:
true if the Job should remain persisted after being orphaned.

isPersistJobDataAfterExecution

public boolean isPersistJobDataAfterExecution()

Specified by:
isPersistJobDataAfterExecution in interface JobDetail
Returns:
whether the associated Job class carries the PersistJobDataAfterExecution annotation.
See Also:
PersistJobDataAfterExecution

isConcurrentExectionDisallowed

public boolean isConcurrentExectionDisallowed()

Specified by:
isConcurrentExectionDisallowed in interface JobDetail
Returns:
whether the associated Job class carries the DisallowConcurrentExecution annotation.
See Also:
DisallowConcurrentExecution

requestsRecovery

public boolean requestsRecovery()

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.

Specified by:
requestsRecovery in interface JobDetail
See Also:
JobExecutionContext.isRecovering()

getJobBuilder

public JobBuilder getJobBuilder()
Get a JobBuilder that is configured to produce a JobDetail identical to this one.

Specified by:
getJobBuilder in interface JobDetail

getNodeSpec

public NodeSpec getNodeSpec()
Accessor to the NodeSpec instance to evaluate constraints

Specified by:
getNodeSpec in interface LocalityAware
Returns:

clone

public Object clone()
Specified by:
clone in interface JobDetail
Overrides:
clone in class Object


Copyright 2001-2011, Terracotta, Inc.