State
Stream Processor state interface.
kxi.sp.state.__all__ = ['Pickle', 'Unpickle', 'get', 'set']
module-attribute
kxi.sp.state.Unpickle
Bases: IntEnum
kxi.sp.state.Unpickle.false = False
class-attribute
kxi.sp.state.Unpickle.true = True
class-attribute
kxi.sp.state.Unpickle.auto = 2
class-attribute
kxi.sp.state.Pickle
Bases: IntEnum
kxi.sp.state.Pickle.false = False
class-attribute
kxi.sp.state.Pickle.true = True
class-attribute
kxi.sp.state.__dir__
kxi.sp.state.get
Get the state of an operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
operator |
Operator
|
The operator, specified as a configuration dictionary or name. |
required |
metadata |
Metadata
|
The metadata dictionary, provided for specialized data retrieval. |
required |
unpickle |
Unpickle
|
A |
Unpickle.auto
|
Returns:
Type | Description |
---|---|
Any
|
The data that was stored in the operator's state. |
kxi.sp.state.set
Set the state of an operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
operator |
Operator
|
The operator, specified as a configuration dictionary or name. |
required |
metadata |
Metadata
|
The metadata dictionary, provided for specialized data storage. |
required |
data |
Any
|
The data to be stored. By default the data will be converted to a |
required |
pickle |
Pickle
|
A |
Pickle.false
|
Returns:
Type | Description |
---|---|
Any
|
The data that was stored in the operator's state. |