Search Results for

    Show / Hide Table of Contents

    Class SchedulerBase

    Abstract base class for implementing any custom IScheduler implementation used by Akka.NET.

    All constructed schedulers are expected to support the Config and ILoggingAdapter arguments provided on the default constructor for this class.

    Inheritance
    object
    SchedulerBase
    HashedWheelTimerScheduler
    Implements
    IScheduler
    ITellScheduler
    ITimeProvider
    IAdvancedScheduler
    IActionScheduler
    IRunnableScheduler
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Actor
    Assembly: Akka.dll
    Syntax
    public abstract class SchedulerBase : IScheduler, ITellScheduler, ITimeProvider, IAdvancedScheduler, IActionScheduler, IRunnableScheduler

    Constructors

    | Edit this page View Source

    SchedulerBase(Config, ILoggingAdapter)

    TBD

    Declaration
    protected SchedulerBase(Config scheduler, ILoggingAdapter log)
    Parameters
    Type Name Description
    Config scheduler

    TBD

    ILoggingAdapter log

    TBD

    Fields

    | Edit this page View Source

    Log

    The ILoggingAdapter provided by the ActorSystem at startup.

    Declaration
    protected readonly ILoggingAdapter Log
    Field Value
    Type Description
    ILoggingAdapter
    | Edit this page View Source

    SchedulerConfig

    The configuration section for a specific IScheduler implementation.

    Declaration
    protected readonly Config SchedulerConfig
    Field Value
    Type Description
    Config

    Properties

    | Edit this page View Source

    HighResMonotonicClock

    The current time since startup, as determined by the high resolution monotonic clock implementation.

    Declaration
    public abstract TimeSpan HighResMonotonicClock { get; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    Typically uses MonotonicClock in most implementations, but in some cases a custom implementation is used - such as when we need to do virtual time scheduling in the Akka.TestKit.

    | Edit this page View Source

    MonotonicClock

    The current time since startup, as determined by the monotonic clock implementation.

    Declaration
    public abstract TimeSpan MonotonicClock { get; }
    Property Value
    Type Description
    TimeSpan
    Remarks

    Typically uses MonotonicClock in most implementations, but in some cases a custom implementation is used - such as when we need to do virtual time scheduling in the Akka.TestKit.

    | Edit this page View Source

    TimeNow

    The current time in UTC.

    Declaration
    protected abstract DateTimeOffset TimeNow { get; }
    Property Value
    Type Description
    DateTimeOffset

    Methods

    | Edit this page View Source

    InternalScheduleOnce(TimeSpan, IRunnable, ICancelable)

    TBD

    Declaration
    protected abstract void InternalScheduleOnce(TimeSpan delay, IRunnable action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan delay

    TBD

    IRunnable action

    TBD

    ICancelable cancelable

    TBD

    | Edit this page View Source

    InternalScheduleOnce(TimeSpan, Action, ICancelable)

    TBD

    Declaration
    protected abstract void InternalScheduleOnce(TimeSpan delay, Action action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan delay

    TBD

    Action action

    TBD

    ICancelable cancelable

    TBD

    | Edit this page View Source

    InternalScheduleRepeatedly(TimeSpan, TimeSpan, IRunnable, ICancelable)

    Declaration
    protected abstract void InternalScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, IRunnable action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan initialDelay
    TimeSpan interval
    IRunnable action
    ICancelable cancelable
    | Edit this page View Source

    InternalScheduleRepeatedly(TimeSpan, TimeSpan, Action, ICancelable)

    TBD

    Declaration
    protected abstract void InternalScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, Action action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    TBD

    TimeSpan interval

    TBD

    Action action

    TBD

    ICancelable cancelable

    TBD

    | Edit this page View Source

    InternalScheduleTellOnce(TimeSpan, ICanTell, object, IActorRef, ICancelable)

    TBD

    Declaration
    protected abstract void InternalScheduleTellOnce(TimeSpan delay, ICanTell receiver, object message, IActorRef sender, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan delay

    TBD

    ICanTell receiver

    TBD

    object message

    TBD

    IActorRef sender

    TBD

    ICancelable cancelable

    TBD

    | Edit this page View Source

    InternalScheduleTellRepeatedly(TimeSpan, TimeSpan, ICanTell, object, IActorRef, ICancelable)

    TBD

    Declaration
    protected abstract void InternalScheduleTellRepeatedly(TimeSpan initialDelay, TimeSpan interval, ICanTell receiver, object message, IActorRef sender, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    TBD

    TimeSpan interval

    TBD

    ICanTell receiver

    TBD

    object message

    TBD

    IActorRef sender

    TBD

    ICancelable cancelable

    TBD

    | Edit this page View Source

    ScheduleOnce(TimeSpan, IRunnable)

    Schedules an action to be invoked after a delay. The action is wrapped so that it completes inside the currently active actor if it is called from within an actor. Note! It's considered bad practice to use concurrency inside actors, and very easy to get wrong so usage is discouraged.

    Declaration
    public void ScheduleOnce(TimeSpan delay, IRunnable action)
    Parameters
    Type Name Description
    TimeSpan delay

    The time period that has to pass before the action is invoked.

    IRunnable action

    The action that is being scheduled.

    | Edit this page View Source

    ScheduleOnce(TimeSpan, IRunnable, ICancelable)

    Schedules an action to be invoked after a delay. The action is wrapped so that it completes inside the currently active actor if it is called from within an actor. Note! It's considered bad practice to use concurrency inside actors, and very easy to get wrong so usage is discouraged.

    Declaration
    public void ScheduleOnce(TimeSpan delay, IRunnable action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan delay

    The time period that has to pass before the action is invoked.

    IRunnable action

    The action that is being scheduled.

    ICancelable cancelable

    A cancelable used to cancel the action from being executed.

    | Edit this page View Source

    ScheduleRepeatedly(TimeSpan, TimeSpan, IRunnable)

    Schedules an action to be invoked after an initial delay and then repeatedly. The action is wrapped so that it completes inside the currently active actor if it is called from within an actor. Note! It's considered bad practice to use concurrency inside actors, and very easy to get wrong so usage is discouraged.

    Declaration
    public void ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, IRunnable action)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    The time period that has to pass before first invocation of the action.

    TimeSpan interval

    The time period that has to pass between each invocation of the action.

    IRunnable action

    The action that is being scheduled.

    | Edit this page View Source

    ScheduleRepeatedly(TimeSpan, TimeSpan, IRunnable, ICancelable)

    Schedules an action to be invoked after an initial delay and then repeatedly. The action is wrapped so that it completes inside the currently active actor if it is called from within an actor. Note! It's considered bad practice to use concurrency inside actors, and very easy to get wrong so usage is discouraged.

    Declaration
    public void ScheduleRepeatedly(TimeSpan initialDelay, TimeSpan interval, IRunnable action, ICancelable cancelable)
    Parameters
    Type Name Description
    TimeSpan initialDelay

    The time period that has to pass before first invocation of the action.

    TimeSpan interval

    The time period that has to pass between each invocation of the action.

    IRunnable action

    The action that is being scheduled.

    ICancelable cancelable

    A cancelable used to cancel the action from being executed.

    | Edit this page View Source

    ValidateDelay(TimeSpan, string)

    TBD

    Declaration
    protected static void ValidateDelay(TimeSpan delay, string parameterName)
    Parameters
    Type Name Description
    TimeSpan delay

    TBD

    string parameterName

    TBD

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    This exception is thrown if the given delay is negative.

    | Edit this page View Source

    ValidateInterval(TimeSpan, string)

    TBD

    Declaration
    protected static void ValidateInterval(TimeSpan interval, string parameterName)
    Parameters
    Type Name Description
    TimeSpan interval

    TBD

    string parameterName

    TBD

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    This exception is thrown if the given interval is negative or zero.

    Implements

    IScheduler
    ITellScheduler
    ITimeProvider
    IAdvancedScheduler
    IActionScheduler
    IRunnableScheduler

    Extension Methods

    SchedulerExtensions.ScheduleOnce(IActionScheduler, int, Action, ICancelable)
    SchedulerExtensions.ScheduleOnceCancelable(IActionScheduler, int, Action)
    SchedulerExtensions.ScheduleOnceCancelable(IActionScheduler, TimeSpan, Action)
    SchedulerExtensions.ScheduleRepeatedly(IActionScheduler, int, int, Action, ICancelable)
    SchedulerExtensions.ScheduleRepeatedlyCancelable(IActionScheduler, int, int, Action)
    SchedulerExtensions.ScheduleRepeatedlyCancelable(IActionScheduler, TimeSpan, TimeSpan, Action)
    SchedulerExtensions.ScheduleTellOnceCancelable(IScheduler, int, ICanTell, object, IActorRef)
    SchedulerExtensions.ScheduleTellOnceCancelable(IScheduler, TimeSpan, ICanTell, object, IActorRef)
    SchedulerExtensions.ScheduleTellRepeatedlyCancelable(IScheduler, int, int, ICanTell, object, IActorRef)
    SchedulerExtensions.ScheduleTellRepeatedlyCancelable(IScheduler, TimeSpan, TimeSpan, ICanTell, object, IActorRef)
    SchedulerExtensions.ScheduleTellOnce(ITellScheduler, int, ICanTell, object, IActorRef, ICancelable)
    SchedulerExtensions.ScheduleTellRepeatedly(ITellScheduler, int, int, ICanTell, object, IActorRef, ICancelable)
    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET