public CoreProjectionQueue(IPublisher publisher, int pendingEventsThreshold, bool orderedPartitionProcessing)
 {
     _queuePendingEvents =
         new StagedProcessingQueue(
             new[]
     {
         true /* record event order - async with ordered output*/, true
         /* get state partition - ordered as it may change correlation id - sync */, false
         /* load foreach state - async- unordered completion*/, orderedPartitionProcessing
         /* process Js - unordered/ordered - inherently unordered/ordered completion*/, true
         /* write emits - ordered - async ordered completion*/, false         /* complete item */
     });
     _publisher = publisher;
     _pendingEventsThreshold = pendingEventsThreshold;
 }
 public CoreProjectionQueue(IPublisher publisher, int pendingEventsThreshold, bool orderedPartitionProcessing)
 {
     _queuePendingEvents =
         new StagedProcessingQueue(
             new[]
             {
                 true /* record event order - async with ordered output*/, true
                 /* get state partition - ordered as it may change correlation id - sync */, false
                 /* load foreach state - async- unordered completion*/, orderedPartitionProcessing
                 /* process Js - unordered/ordered - inherently unordered/ordered completion*/, true
                 /* write emits - ordered - async ordered completion*/, false /* complete item */
             });
     _publisher = publisher;
     _pendingEventsThreshold = pendingEventsThreshold;
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] {true});
     _t1 = new TestTask(1, 1);
     _q.Enqueue(_t1);
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] {true});
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] {false, false, true});
     _t1 = new TestTask(1, 3);
     _t2 = new TestTask(2, 3, 0);
     _t3 = new TestTask(3, 3, 0);
     _q.Enqueue(_t1);
     _q.Enqueue(_t2);
     _q.Enqueue(_t3);
     _processed1 = _q.Process();
     _processed2 = _q.Process();
     _processed3 = _q.Process();
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] {true, true});
     _t1 = new TestTask(1, 2);
     _t2 = new TestTask(2, 2, 0);
     _q.Enqueue(_t1);
     _q.Enqueue(_t2);
     _processed1 = _q.Process();
     _processed2 = _q.Process();
     _processed3 = _q.Process();
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] { false });
     _t1 = new TestTask(Guid.NewGuid(), 1, stageCorrelations: new object[] { "a" });
     _q.Enqueue(_t1);
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] {false, false, true});
     _t1 = new TestTask(1, 3);
     _t2 = new TestTask(2, 3, 0);
     _q.Enqueue(_t1);
     _q.Enqueue(_t2);
     _q.Process(max: 3);
     _q.Process(max: 3);
     _q.Process(max: 3);
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] { true, true });
     _t1 = new TestTask(null, 2, stageCorrelations: new object[]{"a", "a"});
     _t2 = new TestTask(null, 2, stageCorrelations: new object[] { "a", "a" });
     _q.Enqueue(_t1);
     _q.Enqueue(_t2);
 }
 public void when()
 {
     _q = new StagedProcessingQueue(new[] { true, true });
     _t1 = new TestTask(1, 2, 0);
     _q.Enqueue(_t1);
     _q.Initialize();
 }