Show / Hide Table of Contents

Interface IExtractionStateStore

Represents a general extractor state store, for storing first/last timestamps.

Inherited Members
IDisposable.Dispose()
Namespace: Cognite.Extractor.StateStorage
Assembly: Cognite.StateStorage.dll
Syntax
public interface IExtractionStateStore : IDisposable

Methods

| Edit this page View Source

DeleteExtractionState(IEnumerable<IExtractionState>, string, CancellationToken)

Deletes states from state store table given by tableName

Declaration
Task DeleteExtractionState(IEnumerable<IExtractionState> extractionStates, string tableName, CancellationToken token)
Parameters
Type Name Description
IEnumerable<IExtractionState> extractionStates

States to delete

string tableName

Collection to delete from

CancellationToken token
Returns
Type Description
Task
| Edit this page View Source

GetAllExtractionStates<T>(string, CancellationToken)

Find all extraction states in the table.

Declaration
Task<IEnumerable<T>> GetAllExtractionStates<T>(string tableName, CancellationToken token) where T : BaseStorableState
Parameters
Type Name Description
string tableName

Name of table to restore from

CancellationToken token
Returns
Type Description
Task<IEnumerable<T>>
Type Parameters
Name Description
T

Type of state to obtain

| Edit this page View Source

RestoreExtractionState<K>(IDictionary<string, K>, string, bool, CancellationToken)

Restores state from state store table given by tableName

Declaration
Task RestoreExtractionState<K>(IDictionary<string, K> extractionStates, string tableName, bool initializeMissing, CancellationToken token) where K : BaseExtractionState
Parameters
Type Name Description
IDictionary<string, K> extractionStates

States to restore

string tableName

Collection to restore from

bool initializeMissing

If true, initialize states missing from store to empty.

CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
K

Subtype of BaseExtractionState used as state

| Edit this page View Source

RestoreExtractionState<T, K>(IDictionary<string, K>, string, Action<K, T>, CancellationToken)

Generic method to restore state with a custom type.

Declaration
Task RestoreExtractionState<T, K>(IDictionary<string, K> extractionStates, string tableName, Action<K, T> restoreStorableState, CancellationToken token) where T : BaseStorableState where K : IExtractionState
Parameters
Type Name Description
IDictionary<string, K> extractionStates

States to store

string tableName

Collection to store into

Action<K, T> restoreStorableState

Action for pair of stored object and state, to restore the state with information from the poco

CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
T

Subtype of BaseStorableState inserted into state store

K

Implementation of IExtractionState used as state

| Edit this page View Source

StoreExtractionState<K>(IEnumerable<K>, string, CancellationToken)

Store states into state store table given by tableName

Declaration
Task StoreExtractionState<K>(IEnumerable<K> extractionStates, string tableName, CancellationToken token) where K : BaseExtractionState
Parameters
Type Name Description
IEnumerable<K> extractionStates

States to store

string tableName

Collection to store to

CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
K
| Edit this page View Source

StoreExtractionState<T, K>(IEnumerable<K>, string, Func<K, T>, CancellationToken)

Store information from states into state store

Declaration
Task StoreExtractionState<T, K>(IEnumerable<K> extractionStates, string tableName, Func<K, T> buildStorableState, CancellationToken token) where T : BaseStorableState where K : IExtractionState
Parameters
Type Name Description
IEnumerable<K> extractionStates

States to store

string tableName

Collection to store into

Func<K, T> buildStorableState

Method to create a storable state from extraction state

CancellationToken token
Returns
Type Description
Task
Type Parameters
Name Description
T

Subtype of BaseStorableState extracted from state store

K

Implementation of IExtractionState used as state

Extension Methods

DataModelUtils.GetOrCreateResourcesAsync<T, T2>(T2, IEnumerable<InstanceIdentifier>, Func<IEnumerable<InstanceIdentifier>, IEnumerable<SourcedNodeWrite<T>>>, Func<IEnumerable<SourcedNodeWrite<T>>, SanitationMode, (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>)>, int, int, RetryMode, SanitationMode, CancellationToken)
StateStoreUtils.StoreStatesPeriodically<K>(IExtractionStateStore, TimeSpan, IEnumerable<K>, string, CancellationToken)
StateStoreUtils.StoreStatesPeriodically<T, K>(IExtractionStateStore, TimeSpan, IEnumerable<K>, string, Func<K, T>, CancellationToken)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX