Class DefaultClusterNodeServerProvider

    • Constructor Detail

      • DefaultClusterNodeServerProvider

        public DefaultClusterNodeServerProvider​(CloudNet cloudNet)
    • Method Detail

      • getNodeServer

        public IClusterNodeServer getNodeServer​(@NotNull
                                                @NotNull de.dytanic.cloudnet.driver.network.INetworkChannel channel)
        Description copied from interface: IClusterNodeServerProvider
        Returns the node with the specific channel that is configured
        Specified by:
        getNodeServer in interface IClusterNodeServerProvider
        Parameters:
        channel - the channel, that the node is connected with
        Returns:
        the IClusterNodeServer instance or null if the node doesn't registered
      • setClusterServers

        public void setClusterServers​(@NotNull
                                      @NotNull de.dytanic.cloudnet.driver.network.cluster.NetworkCluster networkCluster)
        Description copied from interface: IClusterNodeServerProvider
        Set, replace or update all cluster nodes that are configured
        Specified by:
        setClusterServers in interface IClusterNodeServerProvider
        Parameters:
        networkCluster - the specific cluster network node configuration, that can create new IClusterNodeServer instances
      • sendPacket

        public void sendPacket​(@NotNull
                               @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)
        Specified by:
        sendPacket in interface de.dytanic.cloudnet.driver.network.protocol.IPacketSender
      • sendPacketSync

        public void sendPacketSync​(@NotNull
                                   @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)
        Specified by:
        sendPacketSync in interface de.dytanic.cloudnet.driver.network.protocol.IPacketSender
      • deployTemplateInCluster

        public void deployTemplateInCluster​(@NotNull
                                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate serviceTemplate,
                                            @NotNull
                                            @NotNull java.io.InputStream inputStream)
        Description copied from interface: IClusterNodeServerProvider
        Deploys the given template to all connected nodes.
        Specified by:
        deployTemplateInCluster in interface IClusterNodeServerProvider
        Parameters:
        serviceTemplate - the specific template prefix and name configuration
        inputStream - the template data as a zip archive
      • getConnectedChannels

        public java.util.Collection<de.dytanic.cloudnet.driver.network.INetworkChannel> getConnectedChannels()
        Description copied from interface: IClusterNodeServerProvider
        Get all node server network channels which are currently connected and recognized by this provider.
        Specified by:
        getConnectedChannels in interface IClusterNodeServerProvider
        Returns:
        all node server network channels which are currently connected.
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • getServers

        @Deprecated
        @ScheduledForRemoval
        public java.util.Map<java.lang.String,​IClusterNodeServer> getServers()
        Deprecated.
        currently mapped, use DefaultNodeServerProvider.getNodeServers() instead.
        Gets all nodes servers as unique-id - server map.
        Returns:
        all nodes servers as unique-id - server map.