public ProcessingSequenceBarrier(TSequencer sequencer, TWaitStrategy waitStrategy, Sequence cursorSequence, ISequence[] dependentSequences) { _sequencer = sequencer; _waitStrategy = waitStrategy; _cursorSequence = cursorSequence; _dependentSequence = SequenceGroups.CreateReadOnlySequence(cursorSequence, dependentSequences); }
/// <summary> /// Remove the specified sequence from this sequencer. /// </summary> /// <param name="sequence">to be removed.</param> /// <returns>true if this sequence was found, false otherwise.</returns> public bool RemoveGatingSequence(ISequence sequence) { return(SequenceGroups.RemoveSequence(ref _gatingSequences, sequence)); }
/// <summary> /// Add the specified gating sequences to this instance of the Disruptor. They will /// safely and atomically added to the list of gating sequences. /// </summary> /// <param name="gatingSequences">The sequences to add.</param> public void AddGatingSequences(params ISequence[] gatingSequences) { SequenceGroups.AddSequences(ref _gatingSequences, this, gatingSequences); }
/// <summary> /// Adds a sequence to the sequence group after threads have started to publish to /// the Disruptor.It will set the sequences to cursor value of the ringBuffer /// just after adding them. This should prevent any nasty rewind/wrapping effects. /// </summary> /// <param name="cursored">The data structure that the owner of this sequence group will be pulling it's events from</param> /// <param name="sequence">The sequence to add</param> public void AddWhileRunning(ICursored cursored, Sequence sequence) { SequenceGroups.AddSequences(ref _sequences, cursored, sequence); }