Class AbstractDefinitionResolver<N extends HistoricalNode & Comparable<? super N>>

java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.AbstractDefinitionResolver<N>
Type Parameters:
N - the node type the backend stores, ordered by created time ascending as required by HistoricalNodeVersionList.
Direct Known Subclasses:
BatchedDefinitionResolver

public abstract class AbstractDefinitionResolver<N extends HistoricalNode & Comparable<? super N>> extends Object
Base class for a storage engine's definition resolver. Maps an incoming point to the node version it belongs to, creating, extending or retiring node versions and writing definition rows as needed.

Subclasses implement writeDefinition(N, BatchContext); all other backend behavior is supplied through the constructor functions.

Lookup order: the batch staging cache, then the node tree, then the node's version list, then the backend for an older version. Staging comes first so a batch sees versions that other in-flight batches created but have not yet published. A point resolves to:

  • the matching node, unchanged;
  • a node with its time range extended, when the timestamp falls outside the matched range;
  • a new node version, when none matches or the point's data type differs from the node's (the old version is retired).

Not thread-safe: call under the storage engine's per-batch lock. The caches have their own locks, but the resolver relies on stable read-then-write sequences within a batch.