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.
Implements
Inherited Members
Namespace: Cognite.Extractor.StateStorage
Assembly: Cognite.StateStorage.dll
Syntax
public class BaseExtractionState : IExtractionState
Constructors
| Edit this page View SourceBaseExtractionState(string)
Constructor
Declaration
public BaseExtractionState(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Id of state |
Properties
| Edit this page View SourceDestinationExtractedRange
Range of data pushed to destination(s)
Declaration
public TimeRange DestinationExtractedRange { get; protected set; }
Property Value
Type | Description |
---|---|
TimeRange |
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 |
LastTimeModified
Last time the destination range was modified.
Declaration
public DateTime? LastTimeModified { get; protected set; }
Property Value
Type | Description |
---|---|
DateTime? |
Mutex
Mutex used for safely modifying ranges
Declaration
protected object Mutex { get; }
Property Value
Type | Description |
---|---|
object |
Methods
| Edit this page View SourceInitExtractedRange(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 |
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) |