Job Components: `Execution Context Slicer Slicer Execution Context`
execution-context/slicer.SlicerExecutionContext
SlicerExecutionContext is designed to add more functionality to interface with the Execution Configuration and any Operation.
Hierarchy
default
<SlicerOperationLifeCycle
>↳
SlicerExecutionContext
Implements
Table of contents
Constructors
Properties
Accessors
Methods
- _resetMethodRegistry
- _runMethod
- _runMethodAsync
- addOperation
- getOperations
- initialize
- onExecutionStats
- onSliceComplete
- onSliceDispatch
- onSliceEnqueued
- shutdown
- slicer
Constructors
constructor
• new SlicerExecutionContext(config
): SlicerExecutionContext
Parameters
Name | Type |
---|---|
config | ExecutionContextConfig |
Returns
Overrides
Defined in
packages/job-components/src/execution-context/slicer.ts:24
Properties
_loader
• Protected
Readonly
_loader: OperationLoader
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:28
_methodRegistry
• Protected
_methodRegistry: Map
<keyof SlicerOperationLifeCycle
, Set
<number
>>
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:30
_operations
• Protected
Readonly
_operations: Set
<SlicerOperationLifeCycle
>
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:29
assetIds
• Readonly
assetIds: string
[] = []
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:18
config
• Readonly
config: ExecutionConfig
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:15
context
• Readonly
context: WorkerContext
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:16
events
• Readonly
events: EventEmitter
The terafoundation EventEmitter
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:24
exId
• Readonly
exId: string
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:20
jobId
• Readonly
jobId: string
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:21
logger
• Readonly
logger: Logger
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:26
Accessors
api
• get
api(): ExecutionContextAPI
Returns
Inherited from
BaseExecutionContext.api
Defined in
packages/job-components/src/execution-context/base.ts:125
apis
• get
apis(): JobAPIInstances
Returns
Defined in
packages/job-components/src/execution-context/slicer.ts:62
Methods
_resetMethodRegistry
▸ _resetMethodRegistry(): void
Returns
void
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:177
_runMethod
▸ _runMethod(method
, ...args
): void
Run an method
Parameters
Name | Type |
---|---|
method | keyof SlicerOperationLifeCycle |
...args | any [] |
Returns
void
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:163
_runMethodAsync
▸ _runMethodAsync(method
, ...args
): Promise
<any
[]>
Run an async method on the operation lifecycle
Parameters
Name | Type |
---|---|
method | keyof SlicerOperationLifeCycle |
...args | any [] |
Returns
Promise
<any
[]>
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:145
addOperation
▸ addOperation(op
): void
Add an operation to the lifecycle queue
Parameters
Name | Type |
---|---|
op | SlicerOperationLifeCycle |
Returns
void
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:138
getOperations
▸ getOperations(): SlicerOperationLifeCycle
[]
Returns a list of any registered Operation that has been initialized.
Returns
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:133
initialize
▸ initialize(recoveryData?
): Promise
<void
>
Called during execution initialization
Parameters
Name | Type | Description |
---|---|---|
recoveryData? | SlicerRecoveryData [] | is the data to recover from |
Returns
Promise
<void
>
Implementation of
SlicerOperationLifeCycle.initialize
Overrides
Defined in
packages/job-components/src/execution-context/slicer.ts:58
onExecutionStats
▸ onExecutionStats(stats
): void
A method called by the "Execution Controller" to give a "Slicer" the opportunity to track various slicer satistics
Parameters
Name | Type |
---|---|
stats | ExecutionStats |
Returns
void
Implementation of
SlicerOperationLifeCycle.onExecutionStats
Defined in
packages/job-components/src/execution-context/slicer.ts:71
onSliceComplete
▸ onSliceComplete(result
): void
A method called by the "Execution Controller" to give a "Slicer" the opportunity to track the slices completed by the execution controller
Parameters
Name | Type |
---|---|
result | SliceResult |
Returns
void
Implementation of
SlicerOperationLifeCycle.onSliceComplete
Defined in
packages/job-components/src/execution-context/slicer.ts:83
onSliceDispatch
▸ onSliceDispatch(slice
): void
A method called by the "Execution Controller" to give a "Slicer" the opportunity to track the slices disptached by the execution controller
Parameters
Name | Type |
---|---|
slice | Slice |
Returns
void
Implementation of
SlicerOperationLifeCycle.onSliceDispatch
Defined in
packages/job-components/src/execution-context/slicer.ts:79
onSliceEnqueued
▸ onSliceEnqueued(slice
): void
A method called by the "Execution Controller" to give a "Slicer" the opportunity to track the slices enqueued by the execution controller
Parameters
Name | Type |
---|---|
slice | Slice |
Returns
void
Implementation of
SlicerOperationLifeCycle.onSliceEnqueued
Defined in
packages/job-components/src/execution-context/slicer.ts:75
shutdown
▸ shutdown(): Promise
<void
>
Called to cleanup all of the registered operations
Returns
Promise
<void
>
Implementation of
SlicerOperationLifeCycle.shutdown
Inherited from
Defined in
packages/job-components/src/execution-context/base.ts:101
slicer
▸ slicer<T
>(): T
The instance of a "Slicer"
Type parameters
Name | Type |
---|---|
T | extends default <OpConfig > = default <OpConfig > |
Returns
T