Beispiel #1
0
        string GetStartCheckpointForSlot(string slotName)
        {
            LongCheckpoint min = null;

            var projections = _projectionsBySlot[slotName];

            foreach (var projection in projections)
            {
                if (_checkpointTracker.NeedsRebuild(projection))
                {
                    return(null);
                }

                var currentValue = _checkpointTracker.GetCurrent(projection);
                if (currentValue == null)
                {
                    return(null);
                }

                var currentCheckpoint = LongCheckpoint.Parse(currentValue);

                if (min == null || currentCheckpoint.LongValue < min.LongValue)
                {
                    min = currentCheckpoint;
                }
            }

            return(min.Value);
        }
        private Int64 GetStartCheckpointForSlot(string slotName)
        {
            Int64 min = Int64.MaxValue;

            if (RebuildSettings.ShouldRebuild)
            {
                throw new JarvisFrameworkEngineException("Projection engine is not used anymore for rebuild. Rebuild is done with the specific RebuildProjectionEngine");
            }

            if (_projectionsBySlot.TryGetValue(slotName, out var projections))
            {
                foreach (var projection in projections)
                {
                    var currentValue = _checkpointTracker.GetCurrent(projection);
                    if (currentValue < min)
                    {
                        min = currentValue;
                    }
                }
            }
            return(min);
        }
Beispiel #3
0
        Int64 GetStartCheckpointForSlot(string slotName)
        {
            Int64 min = Int64.MaxValue;

            var projections = _projectionsBySlot[slotName];

            foreach (var projection in projections)
            {
                if (_checkpointTracker.NeedsRebuild(projection))
                {
                    return(0);
                }

                var currentValue = _checkpointTracker.GetCurrent(projection);
                if (currentValue < min)
                {
                    min = currentValue;
                }
            }

            return(min);
        }