public class CompoundTrigger
extends java.lang.Object
implements org.springframework.scheduling.Trigger
Trigger
that delegates the nextExecutionTime(TriggerContext)
to one of two Triggers. If the override
trigger is
null
, the primary trigger is invoked; otherwise the override trigger is
invoked.Constructor and Description |
---|
CompoundTrigger(org.springframework.scheduling.Trigger primary)
Construct a compound trigger with the supplied primary trigger.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
nextExecutionTime(org.springframework.scheduling.TriggerContext triggerContext) |
void |
setOverride(org.springframework.scheduling.Trigger override)
Set the override trigger; set to null to revert to using the
primary trigger.
|
void |
setPrimary(org.springframework.scheduling.Trigger primary)
Set the primary trigger.
|
public CompoundTrigger(org.springframework.scheduling.Trigger primary)
primary
- the primary trigger.public final void setPrimary(org.springframework.scheduling.Trigger primary)
primary
- the trigger.public void setOverride(org.springframework.scheduling.Trigger override)
override
- the override trigger, or null.public java.util.Date nextExecutionTime(org.springframework.scheduling.TriggerContext triggerContext)
nextExecutionTime
in interface org.springframework.scheduling.Trigger