@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
Parameter | Type |
---|---|
config | ExecutionContextConfig |
loggerName | string |
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
<keyofT
,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
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
Parameter | Type |
---|---|
method | keyof T |
...args | any [] |
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
Parameter | Type |
---|---|
method | keyof T |
...args | any [] |
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
Parameter | Type |
---|---|
op | T |
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
Parameter | Type |
---|---|
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
>