예제 #1
0
 public void RequeueAsPeekConnections(IEnumerable <IPersistentConnection> connections)
 {
     foreach (var connection in connections)
     {
         connection.NextPeekTime = PeekTime;
         PeekConnections.Enqueue(connection);
     }
 }
예제 #2
0
        public void CommitSuccess(string deviceId)
        {
            IPersistentConnection connection;

            if (CommitConnections.TryRemove(deviceId, out connection))
            {
                connection.NextPeekTime = PeekTime;
                PeekConnections.Enqueue(connection);
            }
        }
예제 #3
0
        public void AddConnection(IPersistentConnection connection)
        {
            if (connection.SubscriptionType == SubscriptionType.ReceiveAndForget)
            {
                connection.NextReceiveAndForgetTime = ReceiveAndForgetTime;
                ReceiveAndForgetConnections.Enqueue(connection);
                return;
            }
            if (connection.SubscriptionType == SubscriptionType.PeekAndCommit)
            {
                connection.NextPeekTime = PeekTime;
                PeekConnections.Enqueue(connection);
                return;
            }

            throw new NotImplementedException();
        }