public MonotonicArraySubscriptionSequence(
     IObservable <ArraySegment <TPayload> > observable,
     string identifier,
     Streamable <Empty, TPayload> streamable,
     IStreamObserver <Empty, TPayload> observer,
     OnCompletedPolicy onCompletedPolicy,
     TimelinePolicy timelinePolicy)
     : base(
         observable,
         identifier,
         streamable,
         observer,
         DisorderPolicy.Throw(),
         FlushPolicy.FlushOnPunctuation,
         PeriodicPunctuationPolicy.None(),
         onCompletedPolicy,
         null)
     => this.eventsPerSample = timelinePolicy.sampleSize;
Esempio n. 2
0
        internal static IPartitionedIngressStreamable <TPartitionKey, TPayload> ToCheckpointablePartitionedStreamable <TPartitionKey, TPayload>(
            this IObservable <TPayload> streamEvents,
            Expression <Func <TPayload, TPartitionKey> > partitionExtractor,
            Expression <Func <TPayload, long> > startEdgeExtractor,
            QueryContainer container,
            string identifier,
            DisorderPolicy disorderPolicy,
            PartitionedFlushPolicy flushPolicy,
            PeriodicPunctuationPolicy periodicPunctuationPolicy,
            PeriodicLowWatermarkPolicy lowWatermarkPolicy,
            OnCompletedPolicy onCompletedPolicy)
        {
            Contract.EnsuresOnThrow <IngressException>(true);

            if (disorderPolicy == null)
            {
                disorderPolicy = DisorderPolicy.Throw();
            }

            if (periodicPunctuationPolicy == null)
            {
                periodicPunctuationPolicy = PeriodicPunctuationPolicy.None();
            }

            if (lowWatermarkPolicy == null)
            {
                lowWatermarkPolicy = PeriodicLowWatermarkPolicy.None();
            }

            var a = new PartitionedIntervalIngressStreamable <TPartitionKey, TPayload>(
                streamEvents,
                partitionExtractor,
                startEdgeExtractor,
                (p) => StreamEvent.InfinitySyncTime,
                disorderPolicy,
                flushPolicy,
                periodicPunctuationPolicy,
                lowWatermarkPolicy,
                onCompletedPolicy,
                container,
                identifier);

            return(a);
        }
Esempio n. 3
0
 public StreamEventArraySubscriptionThrowNone(
     IObservable <ArraySegment <StreamEvent <TPayload> > > observable,
     string identifier,
     Streamable <Empty, TPayload> streamable,
     IStreamObserver <Empty, TPayload> observer,
     OnCompletedPolicy onCompletedPolicy,
     IObserver <OutOfOrderStreamEvent <TPayload> > diagnosticOutput)
     : base(
         observable,
         identifier,
         streamable,
         observer,
         DisorderPolicy.Throw(),
         FlushPolicy.FlushOnPunctuation,
         PeriodicPunctuationPolicy.None(),
         onCompletedPolicy,
         diagnosticOutput)
 {
 }
Esempio n. 4
0
 public PartitionedStreamEventArraySubscriptionThrowNone(
     IObservable <ArraySegment <PartitionedStreamEvent <TKey, TPayload> > > observable,
     string identifier,
     Streamable <PartitionKey <TKey>, TPayload> streamable,
     IStreamObserver <PartitionKey <TKey>, TPayload> observer,
     OnCompletedPolicy onCompletedPolicy,
     IObserver <OutOfOrderPartitionedStreamEvent <TKey, TPayload> > diagnosticOutput)
     : base(
         observable,
         identifier,
         streamable,
         observer,
         DisorderPolicy.Throw(),
         PartitionedFlushPolicy.FlushOnLowWatermark,
         PeriodicPunctuationPolicy.None(),
         PeriodicLowWatermarkPolicy.None(),
         onCompletedPolicy,
         diagnosticOutput)
 {
 }
Esempio n. 5
0
        internal static IPartitionedIngressStreamable <TPartitionKey, TPayload> ToCheckpointableStreamable <TPartitionKey, TPayload>(
            this IObservable <PartitionedStreamEvent <TPartitionKey, TPayload> > streamEvents,
            QueryContainer container,
            string identifier,
            DisorderPolicy disorderPolicy,
            PartitionedFlushPolicy flushPolicy,
            PeriodicPunctuationPolicy periodicPunctuationPolicy,
            PeriodicLowWatermarkPolicy lowWatermarkPolicy,
            OnCompletedPolicy onCompletedPolicy)
        {
            Contract.EnsuresOnThrow <IngressException>(true);

            if (disorderPolicy == null)
            {
                disorderPolicy = DisorderPolicy.Throw();
            }

            if (periodicPunctuationPolicy == null)
            {
                periodicPunctuationPolicy = PeriodicPunctuationPolicy.None();
            }

            if (lowWatermarkPolicy == null)
            {
                lowWatermarkPolicy = PeriodicLowWatermarkPolicy.None();
            }

            var a = new PartitionedStreamEventIngressStreamable <TPartitionKey, TPayload>(
                streamEvents,
                disorderPolicy,
                flushPolicy,
                periodicPunctuationPolicy,
                lowWatermarkPolicy,
                onCompletedPolicy,
                container,
                identifier);

            return(a);
        }
Esempio n. 6
0
        internal static IObservableIngressStreamable <TPayload> ToCheckpointableTemporalStreamable <TPayload>(
            this IObservable <TPayload> streamEvents,
            Expression <Func <TPayload, long> > startEdgeExtractor,
            Expression <Func <TPayload, long> > endEdgeExtractor,
            QueryContainer container,
            string identifier,
            DisorderPolicy disorderPolicy,
            FlushPolicy flushPolicy,
            PeriodicPunctuationPolicy periodicPunctuationPolicy,
            OnCompletedPolicy onCompletedPolicy)
        {
            Contract.EnsuresOnThrow <IngressException>(true);

            if (disorderPolicy == null)
            {
                disorderPolicy = DisorderPolicy.Throw();
            }

            if (periodicPunctuationPolicy == null)
            {
                periodicPunctuationPolicy = PeriodicPunctuationPolicy.None();
            }

            var a = new IntervalIngressStreamable <TPayload>(
                streamEvents,
                startEdgeExtractor,
                endEdgeExtractor,
                disorderPolicy,
                flushPolicy,
                periodicPunctuationPolicy,
                onCompletedPolicy,
                container,
                identifier);

            return(a);
        }