Class CloudNet


  • public final class CloudNet
    extends de.dytanic.cloudnet.driver.CloudNetDriver
    • Method Detail

      • getInstance

        public static CloudNet getInstance()
      • start

        public void start()
                   throws java.lang.Exception
        Specified by:
        start in class de.dytanic.cloudnet.driver.CloudNetDriver
        Throws:
        java.lang.Exception
      • reload

        public void reload()
      • stop

        public void stop()
        Specified by:
        stop in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getComponentName

        @NotNull
        public @NotNull java.lang.String getComponentName()
        Specified by:
        getComponentName in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getNodeUniqueId

        @NotNull
        public @NotNull java.lang.String getNodeUniqueId()
        Specified by:
        getNodeUniqueId in class de.dytanic.cloudnet.driver.CloudNetDriver
      • isRunning

        public boolean isRunning()
      • getDefaultLogLevel

        public de.dytanic.cloudnet.common.logging.LogLevel getDefaultLogLevel()
      • setPermissionManagement

        public void setPermissionManagement​(@NotNull
                                            @NotNull de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement)
        Overrides:
        setPermissionManagement in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getLocalTemplateStorage

        @NotNull
        public @NotNull de.dytanic.cloudnet.driver.template.TemplateStorage getLocalTemplateStorage()
        Specified by:
        getLocalTemplateStorage in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getTemplateStorage

        @Nullable
        public @Nullable de.dytanic.cloudnet.driver.template.TemplateStorage getTemplateStorage​(java.lang.String storage)
        Specified by:
        getTemplateStorage in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getAvailableTemplateStorages

        @NotNull
        public @NotNull java.util.Collection<de.dytanic.cloudnet.driver.template.TemplateStorage> getAvailableTemplateStorages()
        Specified by:
        getAvailableTemplateStorages in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getAvailableTemplateStoragesAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.driver.template.TemplateStorage>> getAvailableTemplateStoragesAsync()
        Specified by:
        getAvailableTemplateStoragesAsync in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getCloudServiceProvider

        @NotNull
        public @NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider​(@NotNull
                                                                                                                         @NotNull java.lang.String name)
        Specified by:
        getCloudServiceProvider in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getCloudServiceProvider

        @NotNull
        public @NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider​(@NotNull
                                                                                                                         @NotNull java.util.UUID uniqueId)
        Specified by:
        getCloudServiceProvider in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getCloudServiceProvider

        @NotNull
        public @NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider​(@NotNull
                                                                                                                         @NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)
        Specified by:
        getCloudServiceProvider in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getCloudServiceByNameOrUniqueId

        public de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot getCloudServiceByNameOrUniqueId​(java.lang.String argument)
      • setGlobalLogLevel

        public void setGlobalLogLevel​(@NotNull
                                      @NotNull de.dytanic.cloudnet.common.logging.LogLevel logLevel)
        Specified by:
        setGlobalLogLevel in class de.dytanic.cloudnet.driver.CloudNetDriver
      • setGlobalLogLevel

        public void setGlobalLogLevel​(int logLevel)
        Specified by:
        setGlobalLogLevel in class de.dytanic.cloudnet.driver.CloudNetDriver
      • sendCommandLineAsPermissionUser

        public de.dytanic.cloudnet.common.collection.Pair<java.lang.Boolean,​java.lang.String[]> sendCommandLineAsPermissionUser​(@NotNull
                                                                                                                                      @NotNull java.util.UUID uniqueId,
                                                                                                                                      @NotNull
                                                                                                                                      @NotNull java.lang.String commandLine)
        Specified by:
        sendCommandLineAsPermissionUser in class de.dytanic.cloudnet.driver.CloudNetDriver
      • sendCommandLineAsPermissionUserAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.common.collection.Pair<java.lang.Boolean,​java.lang.String[]>> sendCommandLineAsPermissionUserAsync​(@NotNull
                                                                                                                                                                                                 @NotNull java.util.UUID uniqueId,
                                                                                                                                                                                                 @NotNull
                                                                                                                                                                                                 @NotNull java.lang.String commandLine)
        Specified by:
        sendCommandLineAsPermissionUserAsync in class de.dytanic.cloudnet.driver.CloudNetDriver
      • runTask

        @NotNull
        public <T> @NotNull de.dytanic.cloudnet.common.concurrent.ITask<T> runTask​(java.util.concurrent.Callable<T> runnable)
      • runTask

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<?> runTask​(java.lang.Runnable runnable)
      • isMainThread

        public boolean isMainThread()
      • deployTemplateInCluster

        public void deployTemplateInCluster​(@NotNull
                                            @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate serviceTemplate,
                                            @NotNull
                                            @NotNull java.io.InputStream inputStream)
      • updateServiceTasksInCluster

        public void updateServiceTasksInCluster​(java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTask> serviceTasks,
                                                NetworkUpdateType updateType)
      • updateGroupConfigurationsInCluster

        public void updateGroupConfigurationsInCluster​(java.util.Collection<de.dytanic.cloudnet.driver.service.GroupConfiguration> groupConfigurations,
                                                       NetworkUpdateType updateType)
      • sendAllSync

        public void sendAllSync​(@NotNull
                                @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket... packets)
      • sendAll

        public void sendAll​(@NotNull
                            @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket... packets)
      • createClusterNodeInfoSnapshot

        public de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot createClusterNodeInfoSnapshot()
      • canStartServices

        public boolean canStartServices​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask,
                                        java.lang.String nodeUniqueId)
      • canStartServices

        public boolean canStartServices​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)
      • getValidClusterNodeServers

        public java.util.Collection<IClusterNodeServer> getValidClusterNodeServers​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)
      • searchLogicNode

        @Nullable
        public @Nullable de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot searchLogicNode​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)
      • searchLogicNodeServer

        @Nullable
        public @Nullable NodeServer searchLogicNodeServer​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)
      • searchLogicNodeServer

        @Nullable
        public @Nullable NodeServer searchLogicNodeServer​(java.util.Collection<java.lang.String> allowedNodes,
                                                          int maxHeapMemory)
      • canStartServices

        public boolean canStartServices​(java.util.Collection<java.lang.String> allowedNodes,
                                        java.lang.String nodeUniqueId)
      • canStartServices

        public boolean canStartServices​(java.util.Collection<java.lang.String> allowedNodes)
      • getValidClusterNodeServers

        public java.util.Collection<IClusterNodeServer> getValidClusterNodeServers​(java.util.Collection<java.lang.String> allowedNodes)
      • searchLogicNode

        @Nullable
        public @Nullable de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot searchLogicNode​(java.util.Collection<java.lang.String> allowedNodes)
      • searchLogicNodeServer

        @Nullable
        public @Nullable de.dytanic.cloudnet.common.collection.Pair<NodeServer,​java.util.Set<de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot>> searchLogicNodeServer​(java.util.Map<java.lang.String,​java.util.Set<de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot>> services)
      • competeWithCluster

        @Deprecated
        public boolean competeWithCluster​(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)
        Deprecated.
      • competeWithCluster

        @Deprecated
        public boolean competeWithCluster​(java.util.Collection<java.lang.String> allowedNodes)
        Deprecated.
      • unregisterPacketListenersByClassLoader

        public void unregisterPacketListenersByClassLoader​(java.lang.ClassLoader classLoader)
      • publishNetworkClusterNodeInfoSnapshotUpdate

        public void publishNetworkClusterNodeInfoSnapshotUpdate()
      • publishPermissionGroupUpdates

        public void publishPermissionGroupUpdates​(java.util.Collection<de.dytanic.cloudnet.driver.permission.IPermissionGroup> permissionGroups,
                                                  NetworkUpdateType updateType)
      • publishH2DatabaseDataToCluster

        public void publishH2DatabaseDataToCluster​(de.dytanic.cloudnet.driver.network.INetworkChannel channel)
      • registerClusterPacketRegistryListeners

        public void registerClusterPacketRegistryListeners​(de.dytanic.cloudnet.driver.network.protocol.IPacketListenerRegistry registry,
                                                           boolean client)
      • scheduleTask

        @NotNull
        public <T> @NotNull de.dytanic.cloudnet.common.concurrent.ITask<T> scheduleTask​(java.util.concurrent.Callable<T> callable)
      • getModuleDirectory

        @Deprecated
        public java.io.File getModuleDirectory()
        Deprecated.
      • getModuleDirectoryPath

        public java.nio.file.Path getModuleDirectoryPath()
      • getNetworkTaskScheduler

        @Deprecated
        @ScheduledForRemoval
        public de.dytanic.cloudnet.common.concurrent.ITaskScheduler getNetworkTaskScheduler()
        Deprecated.
      • getCommandLineArguments

        public java.util.List<java.lang.String> getCommandLineArguments()
      • getCommandLineProperties

        public de.dytanic.cloudnet.common.Properties getCommandLineProperties()
      • getConsole

        public IConsole getConsole()
      • getNetworkClient

        @NotNull
        public @NotNull de.dytanic.cloudnet.driver.network.INetworkClient getNetworkClient()
        Specified by:
        getNetworkClient in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getNetworkServer

        public de.dytanic.cloudnet.driver.network.INetworkServer getNetworkServer()
      • getHttpServer

        public de.dytanic.cloudnet.driver.network.http.IHttpServer getHttpServer()
      • getDatabaseProvider

        @NotNull
        public @NotNull AbstractDatabaseProvider getDatabaseProvider()
        Specified by:
        getDatabaseProvider in class de.dytanic.cloudnet.driver.CloudNetDriver
      • getLastNetworkClusterNodeInfoSnapshot

        public de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot getLastNetworkClusterNodeInfoSnapshot()
      • getCurrentNetworkClusterNodeInfoSnapshot

        public de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot getCurrentNetworkClusterNodeInfoSnapshot()