@terascope/job-components / execution-context/slicer / SlicerExecutionContext
Class: SlicerExecutionContext
SlicerExecutionContext is designed to add more functionality to interface with the Execution Configuration and any Operation.
Extends
Implements
Constructors
new SlicerExecutionContext()
new SlicerExecutionContext(
config
):SlicerExecutionContext
Parameters
Parameter | Type |
---|---|
config | ExecutionContextConfig |
Returns
Overrides
Source
packages/job-components/src/execution-context/slicer.ts:21
Properties
_loader
protected
readonly
_loader:OperationLoader
Inherited from
Source
packages/job-components/src/execution-context/base.ts:30
_methodRegistry
protected
_methodRegistry:Map
<keyofSlicerOperationLifeCycle
,Set
<number
>>
Inherited from
Source
packages/job-components/src/execution-context/base.ts:32
_operations
protected
readonly
_operations:Set
<SlicerOperationLifeCycle
>
Inherited from
Source
packages/job-components/src/execution-context/base.ts:31
assetIds
readonly
assetIds:string
[] =[]
Inherited from
Source
packages/job-components/src/execution-context/base.ts:20
config
readonly
config:ExecutionConfig
Inherited from
Source
packages/job-components/src/execution-context/base.ts:17
context
readonly
context:Context
Inherited from
Source
packages/job-components/src/execution-context/base.ts:18
events
readonly
events:EventEmitter
<DefaultEventMap
>
The terafoundation EventEmitter
Inherited from
Source
packages/job-components/src/execution-context/base.ts:26
exId
readonly
exId:string
Inherited from
Source
packages/job-components/src/execution-context/base.ts:22
jobId
readonly
jobId:string
Inherited from
Source
packages/job-components/src/execution-context/base.ts:23
logger
readonly
logger:Logger
Inherited from
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
apis
get
apis():JobAPIInstances
Returns
Source
packages/job-components/src/execution-context/slicer.ts:66
Methods
_resetMethodRegistry()
protected
_resetMethodRegistry():void
Returns
void
Inherited from
Source
packages/job-components/src/execution-context/base.ts:182
_runMethod()
protected
_runMethod(method
, ...args
):void
Run an method
Parameters
Parameter | Type |
---|---|
method | keyof SlicerOperationLifeCycle |
...args | any [] |
Returns
void
Inherited from
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 SlicerOperationLifeCycle |
...args | any [] |
Returns
Promise
<any
[]>
Inherited from
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 | SlicerOperationLifeCycle |
Returns
void
Inherited from
Source
packages/job-components/src/execution-context/base.ts:143
getOperations()
getOperations():
SlicerOperationLifeCycle
[]
Returns a list of any registered Operation that has been initialized.
Returns
Inherited from
Source
packages/job-components/src/execution-context/base.ts:138
initialize()
initialize(
recoveryData
?):Promise
<void
>
Called during execution initialization
Parameters
Parameter | Type | Description |
---|---|---|
recoveryData ? | SlicerRecoveryData [] | is the data to recover from |
Returns
Promise
<void
>
Implementation of
SlicerOperationLifeCycle
.initialize
Overrides
Source
packages/job-components/src/execution-context/slicer.ts:62
onExecutionStats()
onExecutionStats(
stats
):void
A method called by the "Execution Controller" to give a "Slicer" the opportunity to track various slicer satistics
Parameters
Parameter | Type |
---|---|
stats | ExecutionStats |
Returns
void
Implementation of
SlicerOperationLifeCycle
.onExecutionStats
Source
packages/job-components/src/execution-context/slicer.ts:75
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
Parameter | Type |
---|---|
result | SliceResult |
Returns
void
Implementation of
SlicerOperationLifeCycle
.onSliceComplete
Source
packages/job-components/src/execution-context/slicer.ts:87
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
Parameter | Type |
---|---|
slice | Slice |
Returns
void
Implementation of
SlicerOperationLifeCycle
.onSliceDispatch
Source
packages/job-components/src/execution-context/slicer.ts:83
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
Parameter | Type |
---|---|
slice | Slice |
Returns
void
Implementation of
SlicerOperationLifeCycle
.onSliceEnqueued
Source
packages/job-components/src/execution-context/slicer.ts:79
shutdown()
shutdown():
Promise
<void
>
Called to cleanup all of the registered operations
Returns
Promise
<void
>
Implementation of
SlicerOperationLifeCycle
.shutdown
Inherited from
Source
packages/job-components/src/execution-context/base.ts:103
slicer()
slicer<
T
>():T
The instance of a "Slicer"
Type parameters
Type parameter | Value |
---|---|
T extends default <OpConfig > | default <OpConfig > |
Returns
T
Source
packages/job-components/src/execution-context/slicer.ts:71
createContext()
static
createContext(config
):Promise
<SlicerExecutionContext
>
Parameters
Parameter | Type |
---|---|
config | ExecutionContextConfig |
Returns
Promise
<SlicerExecutionContext
>