Пример #1
0
        public void SendEndMessages(string senderIdentifier)
        {
            PayloadMessage message = MakeLastMessage(senderIdentifier, sequenceNumber);

            if (message != null)
            {
                ++sequenceNumber;
                stream.OnNextAsync(message.AsImmutable());
            }
            message = new PayloadMessage(senderIdentifier, sequenceNumber++, null, true);
            stream.OnNextAsync(message.AsImmutable());
        }
Пример #2
0
 public override void SendBatchedMessages(string senderIdentifier)
 {
     while (true)
     {
         PayloadMessage message = MakeBatchedMessage(senderIdentifier, outputSequenceNumbers[roundRobinIndex]);
         if (message == null)
         {
             break;
         }
         RoundRobinSending(message.AsImmutable());
     }
 }
Пример #3
0
 public override void SendEndMessages(string senderIdentifier)
 {
     foreach (Pair <int, List <TexeraTuple> > pair in MakeLastPayload())
     {
         SendMessageTo(receivers[pair.First], new PayloadMessage(senderIdentifier, outputSequenceNumbers[pair.First]++, pair.Second, false).AsImmutable(), 0);
     }
     for (int i = 0; i < receivers.Count; ++i)
     {
         PayloadMessage message = new PayloadMessage(senderIdentifier, outputSequenceNumbers[i]++, null, true);
         SendMessageTo(receivers[i], message.AsImmutable(), 0);
     }
 }
Пример #4
0
 public void SendBatchedMessages(string senderIdentifier)
 {
     while (true)
     {
         PayloadMessage message = MakeBatchedMessage(senderIdentifier, sequenceNumber);
         if (message == null)
         {
             break;
         }
         ++sequenceNumber;
         stream.OnNextAsync(message.AsImmutable());
     }
 }
Пример #5
0
        public override void SendEndMessages(string senderIdentifier)
        {
            PayloadMessage message = MakeLastMessage(senderIdentifier, outputSequenceNumbers[roundRobinIndex]);

            if (message != null)
            {
                RoundRobinSending(message.AsImmutable());
            }
            for (int i = 0; i < receivers.Count; ++i)
            {
                message = new PayloadMessage(senderIdentifier, outputSequenceNumbers[i]++, null, true);
                SendMessageTo(receivers[i], message.AsImmutable(), 0);
            }
        }
Пример #6
0
 public virtual void Send(PayloadMessage message)
 {
     SendInternal(message.AsImmutable(), 0);
 }