class Quartz::EventSet

Overview

EventSet represents the pending event set and encompasses all future events scheduled to occur.

Defined in:

quartz/event_set.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Quartz::Any) ==

Instance methods inherited from class Object

===(other : Quartz::Any) ===

Constructor Detail

def self.new(time : TimePoint = TimePoint.new(0)) : self #

[View source]
def self.new(priority_queue : Symbol, current_time : TimePoint = TimePoint.new(0)) #

[View source]

Instance Method Detail

def advance : TimePoint #

Advance the current time up to the next planned event.


[View source]
def advance(until t : TimePoint) : TimePoint #

Advance the current time until it reaches the given time point.


[View source]
def advance(by duration : Duration) : TimePoint #

Advance the current time up to the specified planned duration using a multiscale time advancement.

Raises if the current time advances beyond the imminent events.


[View source]
def cancel_event(event : Schedulable) : Schedulable? #

Cancel the specified event.


[View source]
def clear #

Clears self.


[View source]
def current_time : TimePoint #

Returns the current time associated with the event set.


[View source]
def current_time=(current_time : TimePoint) #

Returns the current time associated with the event set.


[View source]
def duration_of(event : Schedulable) : Duration #

Returns the planned duration after which the specified event will occur.


[View source]
def each_imminent_event(&) #

Deletes and yields each imminent simultaneous event.


[View source]
def empty? : Bool #

Whether the event set is empty.


[View source]
def imminent_duration : Duration #

Returns the planned Duration associated with the future imminent events to occur, or Duration::INFINIY if self is empty.


[View source]
def inspect(io) #

[View source]
def plan_event(event : Schedulable, duration : Duration) #

Schedules a future event at a given planned duration.


[View source]
def pop_imminent_event : Schedulable #

Deletes and returns the next imminent event to occur.


[View source]
def pop_imminent_events : Array(Schedulable) #

Deletes and returns all imminent simultaneous events.


[View source]
def priority_queue : Quartz::PriorityQueue(Schedulable) #

[View source]
def size #

Returns the number of scheduled events.


[View source]