Package com.atlassian.bamboo.quartz
Class PreventJobExecutionUntilCompletedTriggerListener
java.lang.Object
org.quartz.listeners.TriggerListenerSupport
com.atlassian.bamboo.quartz.PreventJobExecutionUntilCompletedTriggerListener
- All Implemented Interfaces:
org.quartz.TriggerListener
public class PreventJobExecutionUntilCompletedTriggerListener
extends org.quartz.listeners.TriggerListenerSupport
This trigger listener will allow only one job (identified by JobDetail) to be executed at a time by given trigger.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
void
triggerComplete
(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context, org.quartz.Trigger.CompletedExecutionInstruction triggerInstructionCode) void
triggerFired
(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context) Register context only if there's no already registered context for given Trigger and JobDetail pairboolean
vetoJobExecution
(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context) Veto job execution Register context only if there's no already registered context for given Trigger and JobDetail pairMethods inherited from class org.quartz.listeners.TriggerListenerSupport
getLog, triggerMisfired
-
Field Details
-
INSTANCE
public static final org.quartz.TriggerListener INSTANCE
-
-
Constructor Details
-
PreventJobExecutionUntilCompletedTriggerListener
public PreventJobExecutionUntilCompletedTriggerListener()
-
-
Method Details
-
getName
-
triggerComplete
public void triggerComplete(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context, org.quartz.Trigger.CompletedExecutionInstruction triggerInstructionCode) - Specified by:
triggerComplete
in interfaceorg.quartz.TriggerListener
- Overrides:
triggerComplete
in classorg.quartz.listeners.TriggerListenerSupport
-
triggerFired
public void triggerFired(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context) Register context only if there's no already registered context for given Trigger and JobDetail pair- Specified by:
triggerFired
in interfaceorg.quartz.TriggerListener
- Overrides:
triggerFired
in classorg.quartz.listeners.TriggerListenerSupport
- Parameters:
trigger
-context
-
-
vetoJobExecution
public boolean vetoJobExecution(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context) Veto job execution Register context only if there's no already registered context for given Trigger and JobDetail pair- Specified by:
vetoJobExecution
in interfaceorg.quartz.TriggerListener
- Overrides:
vetoJobExecution
in classorg.quartz.listeners.TriggerListenerSupport
- Parameters:
trigger
-context
-
-