Class CloudServerManager
java.lang.Object
net.streamlinecloud.main.core.server.CloudServerManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidgetServerByName(String name) getServerByUuid(String uuid) @Nullable List<CloudServer> getServersByName(String name) Returns a list ofCloudServersby the given name.voidstartServerByGroup(CloudGroup cloudGroup) startServerByGroup(CloudGroup cloudGroup, List<String> templates) voidExecutesstartServersIfNeeded(CloudGroup)for every active group.voidtask()
-
Constructor Details
-
CloudServerManager
public CloudServerManager()
-
-
Method Details
-
task
public void task() -
startNextServer
public void startNextServer() -
fallbackControlTask
public void fallbackControlTask() -
getServerByName
- Parameters:
name- The name of the wanted server (without the uuid) (like just lobby-1)- Returns:
- Returns the prioritized server with this name. Could return different servers if the server gets replaced
-
getServerByUuid
- Parameters:
uuid- The uuid of the wanted server- Returns:
- Returns the unique server with the same uuid
-
getServersByName
Returns a list ofCloudServersby the given name.
This function support wildcard and is intended to use for wildcards.
Normally it returns only one CloudServer if not used with a wildcard.
Example:lobby-1 or proxy-1would return a list with only one server.
Example:lobby-* or proxy-*would return a list with all servers in a specific group or with a specific naming pattern.
You cannot use*alone. This is intended and disabled for security reasons.- Parameters:
name- name of the server or wildcard.- Returns:
- list of a CloudServer if found otherwise null
-
startServersIfNeeded
public void startServersIfNeeded()ExecutesstartServersIfNeeded(CloudGroup)for every active group. Groups are processed by priority. -
startServerByGroup
-
startServerByGroup
-
calculateServerNumber
-