Exemplo n.º 1
0
 public PartitionedIntervalArraySubscriptionThrowNone(
     IObservable <ArraySegment <TPayload> > observable,
     Expression <Func <TPayload, TKey> > partitionExtractor,
     Expression <Func <TPayload, long> > startEdgeExtractor,
     Expression <Func <TPayload, long> > endEdgeExtractor,
     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)
 {
     this.partitionExtractor = partitionExtractor;
     this.partitionFunction  = partitionExtractor.Compile();
     this.startEdgeExtractor = startEdgeExtractor;
     this.startEdgeFunction  = startEdgeExtractor.Compile();
     this.endEdgeExtractor   = endEdgeExtractor;
     this.endEdgeFunction    = endEdgeExtractor.Compile();
 }
Exemplo 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,
            Expression <Func <TPayload, long> > endEdgeExtractor,
            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,
                endEdgeExtractor,
                disorderPolicy,
                flushPolicy,
                periodicPunctuationPolicy,
                lowWatermarkPolicy,
                onCompletedPolicy,
                container,
                identifier);

            return(a);
        }
Exemplo n.º 3
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)
 {
 }