Events¶
The Storage API generates events using the Encore Event API. This module defines the event classes that are required aby the abstract API.
Event Inheritance Diagram¶
The following diagram shows the inheritance heirarchy of the various Event subclasses defined in this module. When listening for events, you may want to listen on appropriate superclasses.
Storage Events¶
This module contains asbtract and concrete Event subclasses that support the Storage API.
- class encore.storage.events.StoreDeleteEvent(source=None, **kwargs)[source]¶
An event generated when a value is deleted into a Key-Value Store
- key¶
The key which is involved in the event.
- Type:
string
- action¶
The modification action that was performed.
- Type:
‘delete’
- class encore.storage.events.StoreEvent(source=None, **kwargs)[source]¶
An abstract base class for events generated by a Key-Value Store
- source¶
The key-value store which generated the event.
- Type:
Store instance
- class encore.storage.events.StoreKeyEvent(source=None, **kwargs)[source]¶
An abstract base class for events related to a particular key in the store. This should provide the key and metadata (if available) of the modified key.
- key¶
The key which is involved in the event.
- Type:
string
- class encore.storage.events.StoreModificationEvent(source=None, **kwargs)[source]¶
An abstract base class for modification events generated by a Key-Value Store
- key¶
The key which is involved in the event.
- Type:
string
- action¶
The modification action that was performed. One of ‘set’, ‘update’ or ‘delete’.
- Type:
string
- class encore.storage.events.StoreProgressEndEvent(source=None, **kwargs)[source]¶
- operation_id¶
A unique identifier for the operation that is finished.
- message¶
A human-readable describing the state of the operation that ended.
- Type:
string
- key¶
The key which is involved in the event.
- Type:
string
- exit_state¶
A constant describing the end state of the operation. One of
normal
,warning
,error
orexception
.- Type:
string
- class encore.storage.events.StoreProgressEvent(source=None, **kwargs)[source]¶
Abstract base class for ProgressEvents generated by a Key-Value Store
- operation_id¶
A unique identifier for the operation being performed.
- message¶
A human-readable describing the operation being performed.
- Type:
string
- key¶
The key which is involved in the event.
- Type:
string
- class encore.storage.events.StoreProgressStartEvent(source=None, **kwargs)[source]¶
- operation_id¶
A unique identifier for the operation being performed.
- message¶
A human-readable describing the operation being performed.
- Type:
string
- key¶
The key which is involved in the event.
- Type:
string
- class encore.storage.events.StoreProgressStepEvent(source=None, **kwargs)[source]¶
- operation_id¶
A unique identifier for the operation being performed.
- message¶
A human-readable describing the state of the operation being performed.
- Type:
string
- key¶
The key which is involved in the event.
- Type:
string
- class encore.storage.events.StoreSetEvent(source=None, **kwargs)[source]¶
An event generated when a value is set into a Key-Value Store
- key¶
The key which is involved in the event.
- Type:
string
- action¶
The modification action that was performed.
- Type:
‘set’