Show / Hide Table of Contents

Class RemoteConfigManager<T>

Class to handle fetching of remote config objects.

Inheritance
object
RemoteConfigManager<T>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public class RemoteConfigManager<T> where T : VersionedConfig
Type Parameters
Name Description
T

Constructors

| Edit this page View Source

RemoteConfigManager(CogniteDestination, ILogger?, RemoteConfig, RemoteConfigState<T>, string?, bool, int[]?)

Constructor.

Declaration
public RemoteConfigManager(CogniteDestination destination, ILogger? logger, RemoteConfig remoteConfig, RemoteConfigState<T> state, string? configFilePath, bool bufferConfigFile, int[]? acceptedConfigVersions)
Parameters
Type Name Description
CogniteDestination destination

Cognite destination to use to fetch data from CDF.

ILogger logger

Logger to use

RemoteConfig remoteConfig

Remote config object

RemoteConfigState<T> state

Shared remote config manager state

string configFilePath

Path to local config file, used for buffering.

bool bufferConfigFile

True to buffer the config file.

int[] acceptedConfigVersions

List of accepted values of the "version" parameter, or null.

Properties

| Edit this page View Source

Config

Current configuration object, if fetched.

Declaration
public T? Config { get; }
Property Value
Type Description
T
| Edit this page View Source

Revision

Current revision, 0 if it is not known.

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

UpdatePeriod

Period between each check for new config revisions.

Declaration
public ITimeSpanProvider UpdatePeriod { get; set; }
Property Value
Type Description
ITimeSpanProvider

Methods

| Edit this page View Source

FetchLatest(CancellationToken)

Fetch latest configuration file from CDF.

Declaration
public Task<T?> FetchLatest(CancellationToken token)
Parameters
Type Name Description
CancellationToken token

Cancellation token.

Returns
Type Description
Task<T>

The new configuration object if one was found. If none was found or the revision number was unchanged, this returns null.

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