Skip to main content

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

Class: default<T>

Defined in: packages/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

new default()

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

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

Parameters

ParameterType
configExecutionContextConfig
loggerNamestring

Returns

default<T>

Properties

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

Accessors

api

Get Signature

get api(): ExecutionContextAPI

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

Returns

ExecutionContextAPI

Methods

_resetMethodRegistry()

protected _resetMethodRegistry(): void

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

Returns

void


_runMethod()

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

Defined in: packages/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: packages/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: packages/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: packages/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: packages/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: packages/job-components/src/execution-context/base.ts:103

Called to cleanup all of the registered operations

Returns

Promise<void>