public void RequeueAsPeekConnections(IEnumerable <IPersistentConnection> connections) { foreach (var connection in connections) { connection.NextPeekTime = PeekTime; PeekConnections.Enqueue(connection); } }
public void CommitSuccess(string deviceId) { IPersistentConnection connection; if (CommitConnections.TryRemove(deviceId, out connection)) { connection.NextPeekTime = PeekTime; PeekConnections.Enqueue(connection); } }
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(); }