CommitMongoDBObserver

Hierarchy

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new CommitMongoDBObserver(): CommitMongoDBObserver

Creates an instance of CommitMongoDBObserver. Creates an instance of CommitMongoDBObserver.

Returns: CommitMongoDBObserver

Properties

state

state: State

Implementation of Stateful.state

Overrides StatefulMixin.state


stream

stream: Cursor‹any› | undefined

Methods

getSelectableStates

getSelectableStates(): Record‹string, State

Implementation of Stateful

Inherited from StatefulMixin.getSelectableStates

Overrides Task.getSelectableStates

Returns: Record‹string, State


getState

getState(): State

Implementation of Stateful

Inherited from StatefulMixin.getState

Overrides Task.getState

Returns: State


hasState

hasState(): boolean

Implementation of Stateful

Inherited from StatefulMixin.hasState

Overrides Task.hasState

Returns: boolean


initializeEventHandlers

initializeEventHandlers(): Promise‹void›

Initializes event handlers.

async

Returns: Promise‹void›


isInOneOfStates

isInOneOfStates(states: State | State[]): boolean

Implementation of Stateful

Inherited from StatefulMixin.isInOneOfStates

Overrides Task.isInOneOfStates

Parameters:

NameType
statesState | State[]

Returns: boolean


isInState

isInState(state: State | State[]): boolean

Implementation of Stateful

Inherited from StatefulMixin.isInState

Overrides Task.isInState

Parameters:

NameType
stateState | State[]

Returns: boolean


isObserving

isObserving(): boolean

Evaluates if Mongo's commit collection is observed.

Returns: boolean


pauseObserving

pauseObserving(): Promise‹void›

Pause observing Mongo's commit collection for changes.

async

Returns: Promise‹void›


setState

setState(state: State): void

Implementation of Stateful

Inherited from StatefulMixin.setState

Overrides Task.setState

Parameters:

NameType
stateState

Returns: void


startObserving

startObserving(commitPublisher: CommitPublisher): Promise‹void›

Observes MongoDB collection for changes and publishes them through CommitPublisher.

async

Parameters:

NameTypeDescription
commitPublisherCommitPublisherInstance implementing CommitPublisher interface.

Returns: Promise‹void›


stopObserving

stopObserving(): Promise‹void›

Stops observing observed Mongo's commit collection for changes.

async

Returns: Promise‹void›


validateState

validateState(stateOrStates: State | State[], error?: Error): boolean

Implementation of Stateful

Inherited from StatefulMixin.validateState

Overrides Task.validateState

Parameters:

NameType
stateOrStatesState | State[]
error?Error

Returns: boolean

Object literals

Static STATES

STATES: object

closed

closed: string = "closed"

created

created: string = "created"

ended

ended: string = "ended"

failed

failed: string = "failed"

finished

finished: string = "finished"

observing

observing: string = "observing"

paused

paused: string = "paused"