@bedrock-oss/bedrock-boost
    Preparing search index...

    Class PulseScheduler<T>

    Represents a scheduler that executes a processor function at regular intervals for each item in the list.

    Type Parameters

    • T

      The type of items in the scheduler.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new PulseScheduler instance.

      Type Parameters

      • T

      Parameters

      • processor: (t: T) => void
      • period: number

        The period of the scheduler.

      Returns PulseScheduler<T>

    Properties

    items: T[]
    processor: (t: T) => void

    Methods

    • Adds an item to the schedule.

      Parameters

      • item: T

        The item to be added.

      Returns void

      Use push instead.

    • Adds multiple items to the schedule.

      Parameters

      • items: T[]

        The items to be added.

      Returns void

      Use push instead.

    • Returns a list of the items in the schedule.

      Returns readonly T[]

    • Returns undefined | T

    • Parameters

      • ...items: T[]

      Returns number

    • Removes an item from the schedule at the specified index.

      Parameters

      • index: number

        The index of the item to remove.

      Returns void

    • Removes items from the schedule that satisfy the given predicate.

      Parameters

      • predicate: (t: T) => boolean

        The predicate function used to determine if an item should be removed.

      Returns void

    • Returns undefined | T

    • Parameters

      • start: number
      • OptionaldeleteCount: number

      Returns T[]

    • Parameters

      • start: number
      • deleteCount: number
      • ...items: T[]

      Returns T[]

    • Starts the schedule.

      Returns void

    • Stops the schedule.

      Returns void

    • Parameters

      • ...items: T[]

      Returns number