Show / Hide Table of Contents

Class BaseExtractionState

A minimal extraction state implementation. Represents a single object in a source system that maps to a single object in some destination system.

Keeps track of a TimeRange DestinationExtractedRange which represents the range of timestamps that are currently present in the destination system.

Inheritance
object
BaseExtractionState
HistoryExtractionState
Implements
IExtractionState
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extractor.StateStorage
Assembly: Cognite.StateStorage.dll
Syntax
public class BaseExtractionState : IExtractionState

Constructors

| Edit this page View Source

BaseExtractionState(string)

Constructor

Declaration
public BaseExtractionState(string id)
Parameters
Type Name Description
string id

Id of state

Properties

| Edit this page View Source

DestinationExtractedRange

Range of data pushed to destination(s)

Declaration
public TimeRange DestinationExtractedRange { get; protected set; }
Property Value
Type Description
TimeRange
| Edit this page View Source

Id

Unique id for extracted object. Used as unique ID when storing in permanent storage, so it must be unique within each store.

Declaration
public string Id { get; }
Property Value
Type Description
string
| Edit this page View Source

LastTimeModified

Last time the destination range was modified.

Declaration
public DateTime? LastTimeModified { get; protected set; }
Property Value
Type Description
DateTime?
| Edit this page View Source

Mutex

Mutex used for safely modifying ranges

Declaration
protected object Mutex { get; }
Property Value
Type Description
object

Methods

| Edit this page View Source

InitExtractedRange(DateTime, DateTime)

Called when initializing extracted range from destinations and state storage. Sets the DestinationExtractedRange to (first, last) and sets LastTimeModified to null.

Declaration
public virtual void InitExtractedRange(DateTime first, DateTime last)
Parameters
Type Name Description
DateTime first

First point in destination system

DateTime last

Last point in destination system

| Edit this page View Source

UpdateDestinationRange(DateTime, DateTime)

Update the state with first and last points successfully pushed to destination(s).

Declaration
public virtual void UpdateDestinationRange(DateTime first, DateTime last)
Parameters
Type Name Description
DateTime first

Earliest timestamp in successful push to destination(s)

DateTime last

Latest timestamp in successful push to destination(s)

Implements

IExtractionState

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)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX