@API(status=INTERNAL) public class OnDiskDatafeedIdRepository extends java.lang.Object implements DatafeedIdRepository
DatafeedIdRepository
interface for persisting a datafeed id on disk.Constructor and Description |
---|
OnDiskDatafeedIdRepository(BdkConfig config) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
read()
Read the persisted datafeed id from the storage.
|
java.util.Optional<java.lang.String> |
readAgentBasePath()
Read the persisted agent base path from the storage.
|
void |
write(java.lang.String datafeedId)
Persists the created datafeed id into the storage.
|
void |
write(java.lang.String datafeedId,
java.lang.String agentBasePath)
Persists the created datafeed id and agent base path into the storage.
|
public OnDiskDatafeedIdRepository(BdkConfig config)
public void write(java.lang.String datafeedId)
write
in interface DatafeedIdRepository
datafeedId
- the datafeed id to be persisted.public void write(java.lang.String datafeedId, java.lang.String agentBasePath)
DatafeedIdRepository
write
in interface DatafeedIdRepository
datafeedId
- the datafeed id to be persisted.agentBasePath
- the agent base path (i.e. scheme, host, port, context path) to be persisted.public java.util.Optional<java.lang.String> read()
read
in interface DatafeedIdRepository
public java.util.Optional<java.lang.String> readAgentBasePath()
DatafeedIdRepository
readAgentBasePath
in interface DatafeedIdRepository