public class SmartCMServerList
extends java.lang.Object
| Constructor and Description |
|---|
SmartCMServerList(SteamConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ServerRecord> |
getAllEndPoints()
Gets the
ServerRecords of all servers in the server list. |
long |
getBadConnectionMemoryTimeSpan() |
ServerRecord |
getNextServerCandidate(java.util.EnumSet<ProtocolTypes> supportedProtocolTypes)
Get the next server in the list.
|
ServerRecord |
getNextServerCandidate(ProtocolTypes supportedProtocolTypes)
Get the next server in the list.
|
void |
replaceList(java.util.List<ServerRecord> endPoints)
Replace the list with a new list of servers provided to us by the Steam servers.
|
void |
resetBadServers()
Explicitly resets the known state of all servers.
|
void |
resetOldScores()
Resets the scores of all servers which has a last bad connection more than
badConnectionMemoryTimeSpan ago. |
void |
setBadConnectionMemoryTimeSpan(long badConnectionMemoryTimeSpan) |
boolean |
tryMark(java.net.InetSocketAddress endPoint,
java.util.EnumSet<ProtocolTypes> protocolTypes,
ServerQuality quality) |
boolean |
tryMark(java.net.InetSocketAddress endPoint,
ProtocolTypes protocolTypes,
ServerQuality quality) |
public SmartCMServerList(SteamConfiguration configuration)
public void resetOldScores()
badConnectionMemoryTimeSpan ago.public void replaceList(java.util.List<ServerRecord> endPoints)
endPoints - The ServerRecords to use for this SmartCMServerList.public void resetBadServers()
public boolean tryMark(java.net.InetSocketAddress endPoint,
ProtocolTypes protocolTypes,
ServerQuality quality)
public boolean tryMark(java.net.InetSocketAddress endPoint,
java.util.EnumSet<ProtocolTypes> protocolTypes,
ServerQuality quality)
public ServerRecord getNextServerCandidate(java.util.EnumSet<ProtocolTypes> supportedProtocolTypes)
supportedProtocolTypes - The minimum supported ProtocolTypes of the server to return.ServerRecord, or null if the list is empty.public ServerRecord getNextServerCandidate(ProtocolTypes supportedProtocolTypes)
supportedProtocolTypes - The minimum supported ProtocolTypes of the server to return.ServerRecord, or null if the list is empty.public java.util.List<ServerRecord> getAllEndPoints()
ServerRecords of all servers in the server list.List array contains the ServerRecords of the servers in the listpublic long getBadConnectionMemoryTimeSpan()
public void setBadConnectionMemoryTimeSpan(long badConnectionMemoryTimeSpan)