Skip to main content

StateRefreshedEvent

This event is emitted after the state is brought up to the newest a command may plan against. replaced is true when the state files were replaced with the ones of another commit.

@group

Events/State

Hierarchy

  • StateEvent<{ commitId?: string; previousCommitId?: string; replaced: boolean }>
    • StateRefreshedEvent

Index

Constructors

Properties

Constructors

constructor

  • StateRefreshedEvent(name?: string, payload?: { commitId?: string; previousCommitId?: string; replaced: boolean }): StateRefreshedEvent
  • Parameters

    • optionalname: string

      The subject of the event, when the event type alone does not identify it.

    • optionalpayload: { commitId?: string; previousCommitId?: string; replaced: boolean }

      The event's data.

      • optionalcommitId: string
      • optionalpreviousCommitId: string
      • replaced: boolean

    Returns StateRefreshedEvent

Properties

readonlyinheritedheader

header: { sequence: number; timestamp: number }

When the event was created. sequence counts every event this process created, so it orders two events created in the same millisecond, and events a late listener receives replayed.


Type declaration

  • sequence: number
  • timestamp: number

readonlyinheritedname

name: string

The subject of the event, when the event type alone does not identify it - e.g. the class name on a registration event. Empty otherwise.

readonlyinheritedpayload

payload: { commitId?: string; previousCommitId?: string; replaced: boolean }

The event's data. Its shape is fixed by the event type.


Type declaration

  • optionalcommitId?: string
  • optionalpreviousCommitId?: string
  • replaced: boolean
Page Options