Пример #1
0
        public long GetLastProcessedEtagForNode(string nodeTag)
        {
            if (LastProcessedEtagPerNode.TryGetValue(nodeTag, out var etag))
            {
                return(etag);
            }

            return(0);
        }
Пример #2
0
        public DynamicJsonValue ToJson()
        {
            var json = new DynamicJsonValue
            {
                [nameof(ConfigurationName)]        = ConfigurationName,
                [nameof(TransformationName)]       = TransformationName,
                [nameof(LastProcessedEtagPerNode)] = LastProcessedEtagPerNode.ToJson(),
                [nameof(ChangeVector)]             = ChangeVector
            };

            return(json);
        }
Пример #3
0
        public DynamicJsonValue ToJson()
        {
            var json = new DynamicJsonValue
            {
                [nameof(ConfigurationName)]        = ConfigurationName,
                [nameof(TransformationName)]       = TransformationName,
                [nameof(LastProcessedEtagPerNode)] = LastProcessedEtagPerNode.ToJson(),
                [nameof(ChangeVector)]             = ChangeVector,
                [nameof(NodeTag)] = NodeTag,
                [nameof(SkippedTimeSeriesDocs)] = SkippedTimeSeriesDocs,
            };

            return(json);
        }
Пример #4
0
        public long GetLastProcessedEtag(string dbId, string nodeTag)
        {
            if (LastProcessedEtagPerDbId.TryGetValue(dbId, out var etag))
            {
                return(etag);
            }

#pragma warning disable 618
            if (LastProcessedEtagPerNode != null && LastProcessedEtagPerNode.TryGetValue(nodeTag, out etag))
#pragma warning restore 618
            {
                // legacy EtlProcessState
                return(etag);
            }

            return(0);
        }
Пример #5
0
        public DynamicJsonValue ToJson()
        {
            var json = new DynamicJsonValue
            {
                [nameof(ConfigurationName)]        = ConfigurationName,
                [nameof(TransformationName)]       = TransformationName,
                [nameof(LastProcessedEtagPerDbId)] = LastProcessedEtagPerDbId.ToJson(),
#pragma warning disable 618
                [nameof(LastProcessedEtagPerNode)] = LastProcessedEtagPerNode?.ToJson(),
#pragma warning restore 618
                [nameof(ChangeVector)]          = ChangeVector,
                [nameof(NodeTag)]               = NodeTag,
                [nameof(SkippedTimeSeriesDocs)] = SkippedTimeSeriesDocs,
            };

            return(json);
        }