public void CommitSuccess(string deviceId) { IPersistentConnection connection; if (CommitConnections.TryRemove(deviceId, out connection)) { connection.NextPeekTime = PeekTime; PeekConnections.Enqueue(connection); } }
public bool IsCommitable(string deviceId) { IPersistentConnection connection; if (CommitConnections.TryGetValue(deviceId, out connection)) { return(connection.LastCommitTime > _dateTimeProvider.UtcNow); } return(false); }