Skip to main content

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

Class: default<T>

Defined in: job-components/src/execution-context/base.ts:16

A base class for an Execution Context

Extended by​

Type Parameters​

Type Parameter
T extends OperationLifeCycle

Constructors​

Constructor​

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

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

Parameters​

ParameterType
configExecutionContextConfig
loggerNamestring

Returns​

BaseExecutionContext<T>

Properties​

PropertyModifierTypeDefault valueDescriptionDefined in
_loaderreadonlyOperationLoaderundefined-job-components/src/execution-context/base.ts:30
_methodRegistryprotectedMap<keyof T, Set<number>>undefined-job-components/src/execution-context/base.ts:32
_operationsreadonlySet<T>undefined-job-components/src/execution-context/base.ts:31
assetIdsreadonlystring[][]-job-components/src/execution-context/base.ts:20
configreadonlyExecutionConfigundefined-job-components/src/execution-context/base.ts:17
contextreadonlyContextundefined-job-components/src/execution-context/base.ts:18
eventsreadonlyEventEmitterundefinedThe terafoundation EventEmitterjob-components/src/execution-context/base.ts:26
exIdreadonlystringundefined-job-components/src/execution-context/base.ts:22
jobIdreadonlystringundefined-job-components/src/execution-context/base.ts:23
loggerreadonlyLoggerundefined-job-components/src/execution-context/base.ts:28

Accessors​

api​

Get Signature​

get api(): ExecutionContextAPI

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

Returns​

ExecutionContextAPI

Methods​

_resetMethodRegistry()​

protected _resetMethodRegistry(): void

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

Returns​

void


_runMethod()​

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

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

Run an method

Parameters​

ParameterType
methodkeyof T
...argsany[]

Returns​

void


_runMethodAsync()​

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

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

Run an async method on the operation lifecycle

Parameters​

ParameterType
methodkeyof T
...argsany[]

Returns​

Promise<any[]>


addOperation()​

protected addOperation(op): void

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

Add an operation to the lifecycle queue

Parameters​

ParameterType
opT

Returns​

void


getOperations()​

getOperations(): T[]

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

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

Returns​

T[]


initialize()​

initialize(initConfig?): Promise<void>

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

Called to initialize all of the registered operations

Parameters​

ParameterType
initConfig?unknown

Returns​

Promise<void>


shutdown()​

shutdown(): Promise<void>

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

Called to cleanup all of the registered operations

Returns​

Promise<void>