Table of Contents

Interface IPersistentStateBuffer

Namespace
Sportradar.LiveData.Sdk.Common.Interfaces
Assembly
Sportradar.LiveData.Sdk.dll

Persistent state buffer interface that buffers the underlying client persistent state store.

public interface IPersistentStateBuffer : IStartable
Inherited Members

Properties

TestStatus

Returns true if persistent state buffer is in consistent state and if the underlying client state store is functioning properly.

bool TestStatus { get; }

Property Value

bool

Methods

Clear()

Clears persistent state store contents.

void Clear()

GetAllProviderItems(ProtocolProviderType)

Returns all persistent state items that belong to specific provider.

IEnumerable<PersistentStateItem> GetAllProviderItems(ProtocolProviderType provider_type)

Parameters

provider_type ProtocolProviderType

Provider type

Returns

IEnumerable<PersistentStateItem>

All persistent state items that belong to specific provider.

Read(PersistentStateItemKey)

Retrieves value for the given key from the persistent store.

PersistentStateItem Read(PersistentStateItemKey key)

Parameters

key PersistentStateItemKey

Key

Returns

PersistentStateItem

Retrieved item

Remarks

Returns null if key is not found. Used at error recovery and for double-checking whether persistent state store contents are consistent with buffered values.

Remove(PersistentStateItemKey)

Removes an item by key

void Remove(PersistentStateItemKey key)

Parameters

key PersistentStateItemKey

Key

Write(PersistentStateItem)

Write persistent state item into client provided persistent store (DB, file system).

void Write(PersistentStateItem item)

Parameters

item PersistentStateItem

Persistent state item

Remarks

Overwrites existing values so that stale items can be removed.

Events

OnPersistentStateStatusChanged

Fires event whenever persistent state buffer encounters an error condition (e.g. underlying state store error)

event PersistentStateDelegates.PersistentStateStatusChangedDelegate OnPersistentStateStatusChanged

Event Type

PersistentStateDelegates.PersistentStateStatusChangedDelegate