@terascope/job-components / execution-context/slicer / SlicerExecutionContext
Class: SlicerExecutionContext
Defined in: packages/job-components/src/execution-context/slicer.ts:15
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
Defined in: packages/job-components/src/execution-context/slicer.ts:21
Parameters
Parameter | Type |
---|---|
config | ExecutionContextConfig |
Returns
Overrides
Properties
Accessors
api
Get Signature
get api():
ExecutionContextAPI
Defined in: packages/job-components/src/execution-context/base.ts:130
Returns
Inherited from
apis
Get Signature
get apis():
JobAPIInstances
Defined in: packages/job-components/src/execution-context/slicer.ts:66
Returns
Methods
_resetMethodRegistry()
protected
_resetMethodRegistry():void
Defined in: packages/job-components/src/execution-context/base.ts:182
Returns
void
Inherited from
_runMethod()
protected
_runMethod(method
, ...args
):void
Defined in: packages/job-components/src/execution-context/base.ts:168
Run an method
Parameters
Parameter | Type |
---|---|
method | keyof SlicerOperationLifeCycle |
...args | any [] |
Returns
void
Inherited from
_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
Parameter | Type |
---|---|
method | keyof SlicerOperationLifeCycle |
...args | any [] |
Returns
Promise
<any
[]>
Inherited from
addOperation()
protected
addOperation(op
):void
Defined in: packages/job-components/src/execution-context/base.ts:143
Add an operation to the lifecycle queue
Parameters
Parameter | Type |
---|---|
op | SlicerOperationLifeCycle |
Returns
void
Inherited from
getOperations()
getOperations():
SlicerOperationLifeCycle
[]
Defined in: packages/job-components/src/execution-context/base.ts:138
Returns a list of any registered Operation that has been initialized.
Returns
Inherited from
initialize()
initialize(
recoveryData
?):Promise
<void
>
Defined in: packages/job-components/src/execution-context/slicer.ts:62
Called during execution initialization
Parameters
Parameter | Type | Description |
---|---|---|
recoveryData ? | SlicerRecoveryData [] | is the data to recover from |
Returns
Promise
<void
>
Implementation of
SlicerOperationLifeCycle
.initialize
Overrides
onExecutionStats()
onExecutionStats(
stats
):void
Defined in: packages/job-components/src/execution-context/slicer.ts:75
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
onSliceComplete()
onSliceComplete(
result
):void
Defined in: packages/job-components/src/execution-context/slicer.ts:87
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
onSliceDispatch()
onSliceDispatch(
slice
):void
Defined in: packages/job-components/src/execution-context/slicer.ts:83
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
onSliceEnqueued()
onSliceEnqueued(
slice
):void
Defined in: packages/job-components/src/execution-context/slicer.ts:79
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
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
>
Implementation of
SlicerOperationLifeCycle
.shutdown
Inherited from
slicer()
slicer<
T
>():T
Defined in: packages/job-components/src/execution-context/slicer.ts:71
The instance of a "Slicer"
Type Parameters
Type Parameter | Default type |
---|---|
T extends default <OpConfig > | default <OpConfig > |
Returns
T
createContext()
static
createContext(config
):Promise
<SlicerExecutionContext
>
Defined in: packages/job-components/src/execution-context/slicer.ts:30
Parameters
Parameter | Type |
---|---|
config | ExecutionContextConfig |
Returns
Promise
<SlicerExecutionContext
>