Skip to main content

@terascope/job-components / execution-context/base / default

Class: default<T>

A base class for an Execution Context

Extended by

Type parameters

Type parameter
T extends OperationLifeCycle

Constructors

new default()

new default<T>(config, loggerName): default<T>

Parameters

ParameterType
configExecutionContextConfig
loggerNamestring

Returns

default<T>

Source

packages/job-components/src/execution-context/base.ts:36

Properties

_loader

protected readonly _loader: OperationLoader

Source

packages/job-components/src/execution-context/base.ts:30


_methodRegistry

protected _methodRegistry: Map<keyof T, Set<number>>

Source

packages/job-components/src/execution-context/base.ts:32


_operations

protected readonly _operations: Set<T>

Source

packages/job-components/src/execution-context/base.ts:31


assetIds

readonly assetIds: string[] = []

Source

packages/job-components/src/execution-context/base.ts:20


config

readonly config: ExecutionConfig

Source

packages/job-components/src/execution-context/base.ts:17


context

readonly context: Context

Source

packages/job-components/src/execution-context/base.ts:18


events

readonly events: EventEmitter<DefaultEventMap>

The terafoundation EventEmitter

Source

packages/job-components/src/execution-context/base.ts:26


exId

readonly exId: string

Source

packages/job-components/src/execution-context/base.ts:22


jobId

readonly jobId: string

Source

packages/job-components/src/execution-context/base.ts:23


logger

readonly logger: Logger

Source

packages/job-components/src/execution-context/base.ts:28

Accessors

api

get api(): ExecutionContextAPI

Returns

ExecutionContextAPI

Source

packages/job-components/src/execution-context/base.ts:130

Methods

_resetMethodRegistry()

protected _resetMethodRegistry(): void

Returns

void

Source

packages/job-components/src/execution-context/base.ts:182


_runMethod()

protected _runMethod(method, ...args): void

Run an method

Parameters

ParameterType
methodkeyof T
...argsany[]

Returns

void

Source

packages/job-components/src/execution-context/base.ts:168


_runMethodAsync()

protected _runMethodAsync(method, ...args): Promise<any[]>

Run an async method on the operation lifecycle

Parameters

ParameterType
methodkeyof T
...argsany[]

Returns

Promise<any[]>

Source

packages/job-components/src/execution-context/base.ts:150


addOperation()

protected addOperation(op): void

Add an operation to the lifecycle queue

Parameters

ParameterType
opT

Returns

void

Source

packages/job-components/src/execution-context/base.ts:143


getOperations()

getOperations(): T[]

Returns a list of any registered Operation that has been initialized.

Returns

T[]

Source

packages/job-components/src/execution-context/base.ts:138


initialize()

initialize(initConfig?): Promise<void>

Called to initialize all of the registered operations

Parameters

ParameterType
initConfig?unknown

Returns

Promise<void>

Source

packages/job-components/src/execution-context/base.ts:66


shutdown()

shutdown(): Promise<void>

Called to cleanup all of the registered operations

Returns

Promise<void>

Source

packages/job-components/src/execution-context/base.ts:103