Package de.dytanic.cloudnet
Class CloudNet
- java.lang.Object
-
- de.dytanic.cloudnet.driver.CloudNetDriver
-
- de.dytanic.cloudnet.CloudNet
-
public final class CloudNet extends de.dytanic.cloudnet.driver.CloudNetDriver
-
-
Field Summary
Fields Modifier and Type Field Description static intTPS-
Fields inherited from class de.dytanic.cloudnet.driver.CloudNetDriver
cloudServiceFactory, driverEnvironment, eventManager, generalCloudServiceProvider, groupConfigurationProvider, logger, messenger, moduleProvider, nodeInfoProvider, permissionManagement, scheduler, servicesRegistry, serviceTaskProvider, taskScheduler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanStartServices(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)booleancanStartServices(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask, java.lang.String nodeUniqueId)booleancanStartServices(java.util.Collection<java.lang.String> allowedNodes)booleancanStartServices(java.util.Collection<java.lang.String> allowedNodes, java.lang.String nodeUniqueId)booleancompeteWithCluster(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)Deprecated.booleancompeteWithCluster(java.util.Collection<java.lang.String> allowedNodes)Deprecated.de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshotcreateClusterNodeInfoSnapshot()voiddeployTemplateInCluster(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate serviceTemplate, @NotNull java.io.InputStream inputStream)@NotNull java.util.Collection<de.dytanic.cloudnet.driver.template.TemplateStorage>getAvailableTemplateStorages()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<de.dytanic.cloudnet.driver.template.TemplateStorage>>getAvailableTemplateStoragesAsync()de.dytanic.cloudnet.driver.service.ServiceInfoSnapshotgetCloudServiceByNameOrUniqueId(java.lang.String argument)DefaultCloudServiceManagergetCloudServiceManager()@NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvidergetCloudServiceProvider(@NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)@NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvidergetCloudServiceProvider(@NotNull java.lang.String name)@NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvidergetCloudServiceProvider(@NotNull java.util.UUID uniqueId)IClusterNodeServerProvidergetClusterNodeServerProvider()java.util.List<java.lang.String>getCommandLineArguments()de.dytanic.cloudnet.common.PropertiesgetCommandLineProperties()ICommandMapgetCommandMap()@NotNull java.lang.StringgetComponentName()IConfigurationgetConfig()IConfigurationRegistrygetConfigurationRegistry()IConsolegetConsole()ConsoleCommandSendergetConsoleCommandSender()de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshotgetCurrentNetworkClusterNodeInfoSnapshot()@NotNull AbstractDatabaseProvidergetDatabaseProvider()de.dytanic.cloudnet.common.logging.LogLevelgetDefaultLogLevel()de.dytanic.cloudnet.driver.network.http.IHttpServergetHttpServer()static CloudNetgetInstance()de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshotgetLastNetworkClusterNodeInfoSnapshot()@NotNull de.dytanic.cloudnet.driver.template.TemplateStoragegetLocalTemplateStorage()java.io.FilegetModuleDirectory()Deprecated.java.nio.file.PathgetModuleDirectoryPath()@NotNull de.dytanic.cloudnet.driver.network.INetworkClientgetNetworkClient()de.dytanic.cloudnet.driver.network.INetworkServergetNetworkServer()de.dytanic.cloudnet.common.concurrent.ITaskSchedulergetNetworkTaskScheduler()Deprecated.@NotNull java.lang.StringgetNodeUniqueId()QueuedConsoleLogHandlergetQueuedConsoleLogHandler()ServiceVersionProvidergetServiceVersionProvider()@Nullable de.dytanic.cloudnet.driver.template.TemplateStoragegetTemplateStorage(java.lang.String storage)java.util.Collection<IClusterNodeServer>getValidClusterNodeServers(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)java.util.Collection<IClusterNodeServer>getValidClusterNodeServers(java.util.Collection<java.lang.String> allowedNodes)booleanisMainThread()booleanisRunning()voidpublishH2DatabaseDataToCluster(de.dytanic.cloudnet.driver.network.INetworkChannel channel)voidpublishNetworkClusterNodeInfoSnapshotUpdate()voidpublishPermissionGroupUpdates(java.util.Collection<de.dytanic.cloudnet.driver.permission.IPermissionGroup> permissionGroups, NetworkUpdateType updateType)voidregisterClusterPacketRegistryListeners(de.dytanic.cloudnet.driver.network.protocol.IPacketListenerRegistry registry, boolean client)voidreload()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<?>runTask(java.lang.Runnable runnable)<T> @NotNull de.dytanic.cloudnet.common.concurrent.ITask<T>runTask(java.util.concurrent.Callable<T> runnable)<T> @NotNull de.dytanic.cloudnet.common.concurrent.ITask<T>scheduleTask(java.util.concurrent.Callable<T> callable)@Nullable de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshotsearchLogicNode(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)@Nullable de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshotsearchLogicNode(java.util.Collection<java.lang.String> allowedNodes)@Nullable NodeServersearchLogicNodeServer(de.dytanic.cloudnet.driver.service.ServiceTask serviceTask)@Nullable NodeServersearchLogicNodeServer(java.util.Collection<java.lang.String> allowedNodes, int maxHeapMemory)@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)voidsendAll(@NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket... packets)voidsendAllSync(@NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket... packets)de.dytanic.cloudnet.common.collection.Pair<java.lang.Boolean,java.lang.String[]>sendCommandLineAsPermissionUser(@NotNull java.util.UUID uniqueId, @NotNull java.lang.String commandLine)@NotNull de.dytanic.cloudnet.common.concurrent.ITask<de.dytanic.cloudnet.common.collection.Pair<java.lang.Boolean,java.lang.String[]>>sendCommandLineAsPermissionUserAsync(@NotNull java.util.UUID uniqueId, @NotNull java.lang.String commandLine)voidsetGlobalLogLevel(int logLevel)voidsetGlobalLogLevel(@NotNull de.dytanic.cloudnet.common.logging.LogLevel logLevel)voidsetPermissionManagement(@NotNull de.dytanic.cloudnet.driver.permission.IPermissionManagement permissionManagement)voidstart()voidstop()voidunregisterPacketListenersByClassLoader(java.lang.ClassLoader classLoader)voidupdateGroupConfigurationsInCluster(java.util.Collection<de.dytanic.cloudnet.driver.service.GroupConfiguration> groupConfigurations, NetworkUpdateType updateType)voidupdateServiceTasksInCluster(java.util.Collection<de.dytanic.cloudnet.driver.service.ServiceTask> serviceTasks, NetworkUpdateType updateType)-
Methods inherited from class de.dytanic.cloudnet.driver.CloudNetDriver
getCloudServiceFactory, getCloudServiceProvider, getDriverEnvironment, getEventManager, getGroupConfigurationProvider, getLocalTemplateStorageTemplates, getLocalTemplateStorageTemplatesAsync, getLogger, getMessenger, getModuleProvider, getNodeInfoProvider, getOwnPID, getPermissionManagement, getServicesRegistry, getServiceTaskProvider, getTaskExecutor, getTaskScheduler, getTemplateStorageTemplates, getTemplateStorageTemplatesAsync, optionalInstance, setInstance
-
-
-
-
Field Detail
-
TPS
public static final int TPS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static CloudNet getInstance()
-
start
public void start() throws java.lang.Exception- Specified by:
startin classde.dytanic.cloudnet.driver.CloudNetDriver- Throws:
java.lang.Exception
-
reload
public void reload()
-
stop
public void stop()
- Specified by:
stopin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getComponentName
@NotNull public @NotNull java.lang.String getComponentName()
- Specified by:
getComponentNamein classde.dytanic.cloudnet.driver.CloudNetDriver
-
getNodeUniqueId
@NotNull public @NotNull java.lang.String getNodeUniqueId()
- Specified by:
getNodeUniqueIdin classde.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:
setPermissionManagementin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getLocalTemplateStorage
@NotNull public @NotNull de.dytanic.cloudnet.driver.template.TemplateStorage getLocalTemplateStorage()
- Specified by:
getLocalTemplateStoragein classde.dytanic.cloudnet.driver.CloudNetDriver
-
getTemplateStorage
@Nullable public @Nullable de.dytanic.cloudnet.driver.template.TemplateStorage getTemplateStorage(java.lang.String storage)
- Specified by:
getTemplateStoragein classde.dytanic.cloudnet.driver.CloudNetDriver
-
getAvailableTemplateStorages
@NotNull public @NotNull java.util.Collection<de.dytanic.cloudnet.driver.template.TemplateStorage> getAvailableTemplateStorages()
- Specified by:
getAvailableTemplateStoragesin classde.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:
getAvailableTemplateStoragesAsyncin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getCloudServiceProvider
@NotNull public @NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider(@NotNull @NotNull java.lang.String name)- Specified by:
getCloudServiceProviderin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getCloudServiceProvider
@NotNull public @NotNull de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider(@NotNull @NotNull java.util.UUID uniqueId)- Specified by:
getCloudServiceProviderin classde.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:
getCloudServiceProviderin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getServiceVersionProvider
public ServiceVersionProvider getServiceVersionProvider()
-
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:
setGlobalLogLevelin classde.dytanic.cloudnet.driver.CloudNetDriver
-
setGlobalLogLevel
public void setGlobalLogLevel(int logLevel)
- Specified by:
setGlobalLogLevelin classde.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:
sendCommandLineAsPermissionUserin classde.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:
sendCommandLineAsPermissionUserAsyncin classde.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)
-
getCommandMap
public ICommandMap getCommandMap()
-
getModuleDirectory
@Deprecated public java.io.File getModuleDirectory()
Deprecated.
-
getModuleDirectoryPath
public java.nio.file.Path getModuleDirectoryPath()
-
getConfig
public IConfiguration getConfig()
-
getConfigurationRegistry
public IConfigurationRegistry getConfigurationRegistry()
-
getCloudServiceManager
public DefaultCloudServiceManager getCloudServiceManager()
-
getClusterNodeServerProvider
public IClusterNodeServerProvider getClusterNodeServerProvider()
-
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()
-
getQueuedConsoleLogHandler
public QueuedConsoleLogHandler getQueuedConsoleLogHandler()
-
getConsoleCommandSender
public ConsoleCommandSender getConsoleCommandSender()
-
getNetworkClient
@NotNull public @NotNull de.dytanic.cloudnet.driver.network.INetworkClient getNetworkClient()
- Specified by:
getNetworkClientin classde.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:
getDatabaseProviderin classde.dytanic.cloudnet.driver.CloudNetDriver
-
getLastNetworkClusterNodeInfoSnapshot
public de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot getLastNetworkClusterNodeInfoSnapshot()
-
getCurrentNetworkClusterNodeInfoSnapshot
public de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot getCurrentNetworkClusterNodeInfoSnapshot()
-
-