symphony.bdk.core.service.datafeed.on_disk_datafeed_id_repository.OnDiskDatafeedIdRepository#
- class symphony.bdk.core.service.datafeed.on_disk_datafeed_id_repository.OnDiskDatafeedIdRepository(config: symphony.bdk.core.config.model.bdk_config.BdkConfig)#
Bases:
symphony.bdk.core.service.datafeed.on_disk_datafeed_id_repository.DatafeedIdRepository
Implementation of DatafeedIdRepository interface for persisting a datafeed id on disk.
- __init__(config: symphony.bdk.core.config.model.bdk_config.BdkConfig)#
Methods
__init__
(config)read
()Reads the persisted datafeed from storage.
write
(datafeed_id[, agent_base_path])Persists the created datafeed id into the storage.
Attributes
DATAFEED_ID_FILE
- read() str #
Reads the persisted datafeed from storage.
:return the persisted datafeed id if present in storage, an empty string otherwise
- write(datafeed_id, agent_base_path='')#
Persists the created datafeed id into the storage.
- Parameters
datafeed_id – the datafeed id to be persisted
agent_base_path – the agent base path (i.e. scheme, host, port, context) to be persisted