/// <summary> /// Ctor. /// </summary> /// <param name="getter">for "prev" function access</param> /// <param name="meta">general metadata for grouping</param> public RegexPartitionStateRepoGroup(RegexPartitionStateRandomAccessGetter getter, RegexPartitionStateRepoGroupMeta meta, bool keepScheduleState, RegexPartitionTerminationStateComparator terminationStateCompare) { _getter = getter; _meta = meta; _states = new NullableDictionary <Object, RegexPartitionStateImpl>(); _optionalIntervalSchedules = keepScheduleState ? new RegexPartitionStateRepoScheduleStateImpl(terminationStateCompare) : null; }
/// <summary> /// Ctor. /// </summary> /// <param name="getter">for "prev" access</param> /// <param name="currentStates">existing state</param> /// <param name="optionalKeys">partition keys if any</param> public RegexPartitionStateImpl(RegexPartitionStateRandomAccessGetter getter, ICollection <RegexNFAStateEntry> currentStates, object optionalKeys) { if (getter != null) { _randomAccess = new RegexPartitionStateRandomAccessImpl(getter); } this._currentStates = currentStates.AsList(); this._optionalKeys = optionalKeys; }
/// <summary> /// Ctor. /// </summary> /// <param name="getter">for access</param> public RegexPartitionStateRandomAccessImpl(RegexPartitionStateRandomAccessGetter getter) { _getter = getter; // Construct a rolling buffer of new data for holding max index + 1 (position 1 requires 2 events to keep) _newEvents = new RollingEventBuffer(getter.MaxPriorIndex + 1); if (!getter.IsUnbound) { _priorEventMap = new Dictionary <EventBean, EventBean[]>(); } else { _priorEventMap = null; } }
public RegexPartitionStateRepo MakePartitioned(RegexPartitionStateRandomAccessGetter prevGetter, RegexPartitionStateRepoGroupMeta stateRepoGroupMeta, AgentInstanceContext agentInstanceContext, EventRowRegexNFAView view, bool keepScheduleState, RegexPartitionTerminationStateComparator terminationStateCompare) { return(new RegexPartitionStateRepoGroup(prevGetter, stateRepoGroupMeta, keepScheduleState, terminationStateCompare)); }
/// <summary> /// Ctor. /// </summary> /// <param name="getter">for "prev" access</param> /// <param name="currentStates">existing state</param> public RegexPartitionStateImpl(RegexPartitionStateRandomAccessGetter getter, ICollection <RegexNFAStateEntry> currentStates) : this(getter, currentStates, null) { }
/// <summary> /// Ctor. /// </summary> /// <param name="getter">The getter.</param> /// <param name="keepScheduleState">if set to <c>true</c> [keep schedule state].</param> /// <param name="terminationStateCompare">The termination state compare.</param> public RegexPartitionStateRepoNoGroup(RegexPartitionStateRandomAccessGetter getter, bool keepScheduleState, RegexPartitionTerminationStateComparator terminationStateCompare) { _singletonState = new RegexPartitionStateImpl(getter, new List <RegexNFAStateEntry>()); _optionalIntervalSchedules = keepScheduleState ? new RegexPartitionStateRepoScheduleStateImpl(terminationStateCompare) : null; }