public void RotateRendezvousServers() { lock (@lock) { config.InsertLast(config.RemoveFirst()); } }
public void RotateRendezvousServers() { lock (@lock) { var oldCurrent = config.RemoveFirst(); oldCurrent.RefreshUri(); config.InsertLast(oldCurrent); } }
private static T Get <T>(HashedLinkedList <T> hashSet) { var count = hashSet.Count; if (count > 0) { var first = (count > 1) ? hashSet.RemoveFirst() : hashSet.First; if (count > 1) { hashSet.InsertLast(first); } return(first); } return(default(T)); }