redis_stores
Redis Store Implementations for Merlin Data Models
This module provides Redis-backed storage implementations for various Merlin system models. These store classes offer persistence, retrieval, and management capabilities for core system entities like studies, runs, and workers.
Each store implements a consistent interface through inheritance from RedisStoreBase, with specialized functionality added through mixins (like NameMappingMixin for name-based lookups). The stores handle serialization/deserialization, CRUD operations, and maintain appropriate Redis key structures.
See also
- merlin.backends.redis.redis_base_store: Base classes and mixins
- merlin.db_scripts.data_models: Data model definitions
RedisLogicalWorkerStore
Bases: RedisStoreBase[LogicalWorkerModel]
A Redis-based store for managing LogicalWorkerModel
objects.
Source code in merlin/backends/redis/redis_stores.py
__init__(client)
Initialize the RedisLogicalWorkerStore with a Redis client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Redis
|
A Redis client instance used to interact with the Redis database. |
required |
Source code in merlin/backends/redis/redis_stores.py
RedisPhysicalWorkerStore
Bases: NameMappingMixin, RedisStoreBase[PhysicalWorkerModel]
A Redis-based store for managing PhysicalWorkerModel
objects.
Source code in merlin/backends/redis/redis_stores.py
__init__(client)
Initialize the RedisPhysicalWorkerStore with a Redis client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Redis
|
A Redis client instance used to interact with the Redis database. |
required |
Source code in merlin/backends/redis/redis_stores.py
RedisRunStore
Bases: NameMappingMixin, RedisStoreBase[RunModel]
A Redis-based store for managing RunModel
objects.
Source code in merlin/backends/redis/redis_stores.py
__init__(client)
Initialize the RedisRunStore with a Redis client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Redis
|
A Redis client instance used to interact with the Redis database. |
required |
RedisStudyStore
Bases: NameMappingMixin, RedisStoreBase[StudyModel]
A Redis-based store for managing StudyModel
objects.
Source code in merlin/backends/redis/redis_stores.py
__init__(client)
Initialize the RedisStudyStore with a Redis client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
Redis
|
A Redis client instance used to interact with the Redis database. |
required |