C# Class Quartz.Impl.Triggers.CalendarIntervalTriggerImpl

Inheritance: AbstractTrigger, ICalendarIntervalTrigger
显示文件 Open project: quartznet/quartznet Class Usage Examples

Private Properties

Property Type Description
DaylightSavingHourShiftOccurredAndAdvanceNeeded bool
MakeHourAdjustmentIfNeeded void

Public Methods

Method Description
CalendarIntervalTriggerImpl ( ) : System

Create a ICalendarIntervalTrigger with no settings.

CalendarIntervalTriggerImpl ( string name, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.

CalendarIntervalTriggerImpl ( string name, IntervalUnit intervalUnit, int repeatInterval ) : System

Create a CalendarIntervalTriggerImpl that will occur immediately, and repeat at the given interval.

CalendarIntervalTriggerImpl ( string name, string group, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.

CalendarIntervalTriggerImpl ( string name, string group, IntervalUnit intervalUnit, int repeatInterval ) : System

Create a ICalendarIntervalTrigger that will occur immediately, and repeat at the given interval

CalendarIntervalTriggerImpl ( string name, string group, string jobName, string jobGroup, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.

ComputeFirstFireTimeUtc ( ICalendar calendar ) : DateTimeOffset?

This method should not be used by the Quartz client.

Called by the scheduler at the time a ITrigger is first added to the scheduler, in order to have the ITrigger compute its first fire time, based on any associated calendar.

After this method has been called, ITrigger.GetNextFireTimeUtc should return a valid answer.

GetFireTimeAfter ( DateTimeOffset afterTime ) : DateTimeOffset?

Returns the next time at which the ICalendarIntervalTrigger will fire, after the given time. If the trigger will not fire after the given time, will be returned.

GetMayFireAgain ( ) : bool

Determines whether or not the ICalendarIntervalTrigger will occur again.

GetNextFireTimeUtc ( ) : DateTimeOffset?

Returns the next time at which the ITrigger is scheduled to fire. If the trigger will not fire again, will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads).

The value returned is not guaranteed to be valid until after the ITrigger has been added to the scheduler.

GetPreviousFireTimeUtc ( ) : DateTimeOffset?

Returns the previous time at which the ICalendarIntervalTrigger fired. If the trigger has not yet fired, will be returned.

GetScheduleBuilder ( ) : IScheduleBuilder
SetNextFireTimeUtc ( DateTimeOffset value ) : void
SetPreviousFireTimeUtc ( DateTimeOffset previousFireTimeUtc ) : void
Triggered ( ICalendar calendar ) : void

This method should not be used by the Quartz client.

Called when the IScheduler has decided to 'fire' the trigger (Execute the associated IJob), in order to give the ITrigger a chance to update itself for its next triggering (if any).

UpdateAfterMisfire ( ICalendar cal ) : void

Updates the ICalendarIntervalTrigger's state based on the MisfireInstruction.XXX that was selected when the ICalendarIntervalTrigger was created.

If the misfire instruction is set to MisfireInstruction.SmartPolicy, then the following scheme will be used:

  • The instruction will be interpreted as MisfireInstruction.CalendarIntervalTrigger.FireOnceNow
UpdateWithNewCalendar ( ICalendar calendar, System.TimeSpan misfireThreshold ) : void

This method should not be used by the Quartz client.

The implementation should update the ITrigger's state based on the given new version of the associated ICalendar (the state should be updated so that it's next fire time is appropriate given the Calendar's new settings).

Validate ( ) : void

Validates whether the properties of the IJobDetail are valid for submission into a IScheduler.

Protected Methods

Method Description
GetFireTimeAfter ( DateTimeOffset afterTime, bool ignoreEndTime ) : DateTimeOffset?
ValidateMisfireInstruction ( int misfireInstruction ) : bool

Validates the misfire instruction.

Private Methods

Method Description
DaylightSavingHourShiftOccurredAndAdvanceNeeded ( DateTimeOffset &newTime, int initialHourOfDay ) : bool
MakeHourAdjustmentIfNeeded ( DateTimeOffset &sTime, int initialHourOfDay ) : void

Method Details

CalendarIntervalTriggerImpl() public method

Create a ICalendarIntervalTrigger with no settings.
public CalendarIntervalTriggerImpl ( ) : System
return System

CalendarIntervalTriggerImpl() public method

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.
public CalendarIntervalTriggerImpl ( string name, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System
name string Name for the trigger instance.
startTimeUtc DateTimeOffset A set to the time for the to fire.
endTimeUtc DateTimeOffset A set to the time for the to quit repeat firing.
intervalUnit IntervalUnit The repeat interval unit (minutes, days, months, etc).
repeatInterval int The number of milliseconds to pause between the repeat firing.
return System

CalendarIntervalTriggerImpl() public method

Create a CalendarIntervalTriggerImpl that will occur immediately, and repeat at the given interval.
public CalendarIntervalTriggerImpl ( string name, IntervalUnit intervalUnit, int repeatInterval ) : System
name string Name for the trigger instance.
intervalUnit IntervalUnit The repeat interval unit (minutes, days, months, etc).
repeatInterval int The number of milliseconds to pause between the repeat firing.
return System

CalendarIntervalTriggerImpl() public method

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.
public CalendarIntervalTriggerImpl ( string name, string group, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System
name string Name for the trigger instance.
group string Group for the trigger instance.
startTimeUtc DateTimeOffset A set to the time for the to fire.
endTimeUtc DateTimeOffset A set to the time for the to quit repeat firing.
intervalUnit IntervalUnit The repeat interval unit (minutes, days, months, etc).
repeatInterval int The number of milliseconds to pause between the repeat firing.
return System

CalendarIntervalTriggerImpl() public method

Create a ICalendarIntervalTrigger that will occur immediately, and repeat at the given interval
public CalendarIntervalTriggerImpl ( string name, string group, IntervalUnit intervalUnit, int repeatInterval ) : System
name string Name for the trigger instance.
group string Group for the trigger instance.
intervalUnit IntervalUnit The repeat interval unit (minutes, days, months, etc).
repeatInterval int The number of milliseconds to pause between the repeat firing.
return System

CalendarIntervalTriggerImpl() public method

Create a ICalendarIntervalTrigger that will occur at the given time, and repeat at the given interval until the given end time.
public CalendarIntervalTriggerImpl ( string name, string group, string jobName, string jobGroup, DateTimeOffset startTimeUtc, DateTimeOffset endTimeUtc, IntervalUnit intervalUnit, int repeatInterval ) : System
name string Name for the trigger instance.
group string Group for the trigger instance.
jobName string Name of the associated job.
jobGroup string Group of the associated job.
startTimeUtc DateTimeOffset A set to the time for the to fire.
endTimeUtc DateTimeOffset A set to the time for the to quit repeat firing.
intervalUnit IntervalUnit The repeat interval unit (minutes, days, months, etc).
repeatInterval int The number of milliseconds to pause between the repeat firing.
return System

ComputeFirstFireTimeUtc() public method

This method should not be used by the Quartz client.

Called by the scheduler at the time a ITrigger is first added to the scheduler, in order to have the ITrigger compute its first fire time, based on any associated calendar.

After this method has been called, ITrigger.GetNextFireTimeUtc should return a valid answer.

public ComputeFirstFireTimeUtc ( ICalendar calendar ) : DateTimeOffset?
calendar ICalendar
return DateTimeOffset?

GetFireTimeAfter() public method

Returns the next time at which the ICalendarIntervalTrigger will fire, after the given time. If the trigger will not fire after the given time, will be returned.
public GetFireTimeAfter ( DateTimeOffset afterTime ) : DateTimeOffset?
afterTime DateTimeOffset
return DateTimeOffset?

GetFireTimeAfter() protected method

protected GetFireTimeAfter ( DateTimeOffset afterTime, bool ignoreEndTime ) : DateTimeOffset?
afterTime DateTimeOffset
ignoreEndTime bool
return DateTimeOffset?

GetMayFireAgain() public method

Determines whether or not the ICalendarIntervalTrigger will occur again.
public GetMayFireAgain ( ) : bool
return bool

GetNextFireTimeUtc() public method

Returns the next time at which the ITrigger is scheduled to fire. If the trigger will not fire again, will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads).
The value returned is not guaranteed to be valid until after the ITrigger has been added to the scheduler.
public GetNextFireTimeUtc ( ) : DateTimeOffset?
return DateTimeOffset?

GetPreviousFireTimeUtc() public method

Returns the previous time at which the ICalendarIntervalTrigger fired. If the trigger has not yet fired, will be returned.
public GetPreviousFireTimeUtc ( ) : DateTimeOffset?
return DateTimeOffset?

GetScheduleBuilder() public method

public GetScheduleBuilder ( ) : IScheduleBuilder
return IScheduleBuilder

SetNextFireTimeUtc() public method

public SetNextFireTimeUtc ( DateTimeOffset value ) : void
value DateTimeOffset
return void

SetPreviousFireTimeUtc() public method

public SetPreviousFireTimeUtc ( DateTimeOffset previousFireTimeUtc ) : void
previousFireTimeUtc DateTimeOffset
return void

Triggered() public method

This method should not be used by the Quartz client.

Called when the IScheduler has decided to 'fire' the trigger (Execute the associated IJob), in order to give the ITrigger a chance to update itself for its next triggering (if any).

public Triggered ( ICalendar calendar ) : void
calendar ICalendar
return void

UpdateAfterMisfire() public method

Updates the ICalendarIntervalTrigger's state based on the MisfireInstruction.XXX that was selected when the ICalendarIntervalTrigger was created.
If the misfire instruction is set to MisfireInstruction.SmartPolicy, then the following scheme will be used:
  • The instruction will be interpreted as MisfireInstruction.CalendarIntervalTrigger.FireOnceNow
public UpdateAfterMisfire ( ICalendar cal ) : void
cal ICalendar
return void

UpdateWithNewCalendar() public method

This method should not be used by the Quartz client.

The implementation should update the ITrigger's state based on the given new version of the associated ICalendar (the state should be updated so that it's next fire time is appropriate given the Calendar's new settings).

public UpdateWithNewCalendar ( ICalendar calendar, System.TimeSpan misfireThreshold ) : void
calendar ICalendar
misfireThreshold System.TimeSpan
return void

Validate() public method

Validates whether the properties of the IJobDetail are valid for submission into a IScheduler.
public Validate ( ) : void
return void

ValidateMisfireInstruction() protected method

Validates the misfire instruction.
protected ValidateMisfireInstruction ( int misfireInstruction ) : bool
misfireInstruction int The misfire instruction.
return bool