com.atlassian.bamboo.quartz
Class PreventJobExecutionUntilCompletedTriggerListener

java.lang.Object
  extended by org.quartz.listeners.TriggerListenerSupport
      extended by 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.


Constructor Summary
PreventJobExecutionUntilCompletedTriggerListener()
           
 
Method Summary
 java.lang.String getName()
           
static java.lang.String getTriggerListenerName()
           
 void triggerComplete(org.quartz.Trigger trigger, org.quartz.JobExecutionContext context, int 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 pair
 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
 
Methods inherited from class org.quartz.listeners.TriggerListenerSupport
getLog, triggerMisfired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreventJobExecutionUntilCompletedTriggerListener

public PreventJobExecutionUntilCompletedTriggerListener()
Method Detail

getName

public java.lang.String getName()

getTriggerListenerName

public static java.lang.String getTriggerListenerName()

triggerComplete

public void triggerComplete(org.quartz.Trigger trigger,
                            org.quartz.JobExecutionContext context,
                            int triggerInstructionCode)
Specified by:
triggerComplete in interface org.quartz.TriggerListener
Overrides:
triggerComplete in class org.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 interface org.quartz.TriggerListener
Overrides:
triggerFired in class org.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 interface org.quartz.TriggerListener
Overrides:
vetoJobExecution in class org.quartz.listeners.TriggerListenerSupport
Parameters:
trigger -
context -


Copyright © 2011 Atlassian. All Rights Reserved.