Package de.dytanic.cloudnet.cluster
Interface NodeServerProvider<T extends NodeServer>
-
- All Known Subinterfaces:
IClusterNodeServerProvider
- All Known Implementing Classes:
DefaultClusterNodeServerProvider,DefaultNodeServerProvider
public interface NodeServerProvider<T extends NodeServer>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeServergetHeadNode()Gets the current head node of the cluster, may be the local node.TgetNodeServer(@NotNull java.lang.String uniqueId)Returns the node with the specific uniqueId that is configuredjava.util.Collection<T>getNodeServers()Returns the represent nodes that are configured on the application.NodeServergetSelfNode()Get the jvm static local node server implementation.voidrefreshHeadNode()Re-calculates the head node of the current cluster.
-
-
-
Method Detail
-
getNodeServers
java.util.Collection<T> getNodeServers()
Returns the represent nodes that are configured on the application. The nodes shouldn't be online
-
getNodeServer
@Nullable T getNodeServer(@NotNull @NotNull java.lang.String uniqueId)
Returns the node with the specific uniqueId that is configured- Parameters:
uniqueId- the uniqueId from the node, that should retrieve- Returns:
- the IClusterNodeServer instance or null if the node doesn't registered
-
getHeadNode
NodeServer getHeadNode()
Gets the current head node of the cluster, may be the local node.- Returns:
- the current head node of the cluster.
-
getSelfNode
NodeServer getSelfNode()
Get the jvm static local node server implementation.- Returns:
- the jvm static local node server implementation.
-
refreshHeadNode
void refreshHeadNode()
Re-calculates the head node of the current cluster.
-
-