Class DefaultCloudServiceFactory

    • Constructor Detail

      • DefaultCloudServiceFactory

        public DefaultCloudServiceFactory()
    • Method Detail

      • createCloudService

        @Nullable
        public @Nullable ServiceInfoSnapshot createCloudService​(ServiceTask serviceTask)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudService in interface CloudServiceFactory
        Parameters:
        serviceTask - the task the service should be created from
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudService

        @Nullable
        public @Nullable ServiceInfoSnapshot createCloudService​(ServiceTask serviceTask,
                                                                int taskId)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudService in interface CloudServiceFactory
        Parameters:
        serviceTask - the task the service should be created from
        taskId - the id of the service
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudService

        @Nullable
        public @Nullable ServiceInfoSnapshot createCloudService​(java.lang.String name,
                                                                java.lang.String runtime,
                                                                boolean autoDeleteOnStop,
                                                                boolean staticService,
                                                                java.util.Collection<ServiceRemoteInclusion> includes,
                                                                java.util.Collection<ServiceTemplate> templates,
                                                                java.util.Collection<ServiceDeployment> deployments,
                                                                java.util.Collection<java.lang.String> groups,
                                                                ProcessConfiguration processConfiguration,
                                                                de.dytanic.cloudnet.common.document.gson.JsonDocument properties,
                                                                java.lang.Integer port)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudService in interface CloudServiceFactory
        Parameters:
        name - the name of the task of the new cloud service (the name of the service will be name-id)
        runtime - the runtime of the new cloud service (normally this is "jvm")
        autoDeleteOnStop - should the service be automatically deleted on stop?
        staticService - should the service be a static one?
        includes - the additional files that should be included when preparing the service
        templates - the templates that should be included when preparing the service
        deployments - the deployments that should be added to the service by default
        groups - the groups for the service
        processConfiguration - the process configuration for the service
        properties - the properties for the service (those are not used by the cloud, you can define whatever you want as the properties)
        port - the port of the service
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudService

        @Nullable
        public @Nullable java.util.Collection<ServiceInfoSnapshot> createCloudService​(java.lang.String nodeUniqueId,
                                                                                      int amount,
                                                                                      java.lang.String name,
                                                                                      java.lang.String runtime,
                                                                                      boolean autoDeleteOnStop,
                                                                                      boolean staticService,
                                                                                      java.util.Collection<ServiceRemoteInclusion> includes,
                                                                                      java.util.Collection<ServiceTemplate> templates,
                                                                                      java.util.Collection<ServiceDeployment> deployments,
                                                                                      java.util.Collection<java.lang.String> groups,
                                                                                      ProcessConfiguration processConfiguration,
                                                                                      de.dytanic.cloudnet.common.document.gson.JsonDocument properties,
                                                                                      java.lang.Integer port)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudService in interface CloudServiceFactory
        Parameters:
        nodeUniqueId - the uniqueId of the node where the services should be started on
        amount - the amount of services to be created
        name - the name of the task of the new cloud services (the name of the service will be name-id)
        runtime - the runtime of the new cloud services (normally this is "jvm")
        autoDeleteOnStop - should the services be automatically deleted on stop?
        staticService - should the services be a static one?
        includes - the additional files that should be included when preparing the services
        templates - the templates that should be included when preparing the services
        deployments - the deployments that should be added to the services by default
        groups - the groups for the services
        processConfiguration - the process configuration for the services
        properties - the properties for the services (those are not used by the cloud, you can define whatever you want as the properties)
        port - the port of the services
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudServiceAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<ServiceInfoSnapshot> createCloudServiceAsync​(ServiceTask serviceTask)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudServiceAsync in interface CloudServiceFactory
        Parameters:
        serviceTask - the task the service should be created from
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudServiceAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<ServiceInfoSnapshot> createCloudServiceAsync​(ServiceTask serviceTask,
                                                                                                                 int taskId)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudServiceAsync in interface CloudServiceFactory
        Parameters:
        serviceTask - the task the service should be created from
        taskId - the id of the service
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudServiceAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<ServiceInfoSnapshot> createCloudServiceAsync​(java.lang.String name,
                                                                                                                 java.lang.String runtime,
                                                                                                                 boolean autoDeleteOnStop,
                                                                                                                 boolean staticService,
                                                                                                                 java.util.Collection<ServiceRemoteInclusion> includes,
                                                                                                                 java.util.Collection<ServiceTemplate> templates,
                                                                                                                 java.util.Collection<ServiceDeployment> deployments,
                                                                                                                 java.util.Collection<java.lang.String> groups,
                                                                                                                 ProcessConfiguration processConfiguration,
                                                                                                                 de.dytanic.cloudnet.common.document.gson.JsonDocument properties,
                                                                                                                 java.lang.Integer port)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudServiceAsync in interface CloudServiceFactory
        Parameters:
        name - the name of the task of the new cloud service (the name of the service will be name-id)
        runtime - the runtime of the new cloud service (normally this is "jvm")
        autoDeleteOnStop - should the service be automatically deleted on stop?
        staticService - should the service be a static one?
        includes - the additional files that should be included when preparing the service
        templates - the templates that should be included when preparing the service
        deployments - the deployments that should be added to the service by default
        groups - the groups for the service
        processConfiguration - the process configuration for the service
        port - the port of the service
        Returns:
        the info of the created service or null if the service couldn't be created
      • createCloudServiceAsync

        @NotNull
        public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<java.util.Collection<ServiceInfoSnapshot>> createCloudServiceAsync​(java.lang.String nodeUniqueId,
                                                                                                                                       int amount,
                                                                                                                                       java.lang.String name,
                                                                                                                                       java.lang.String runtime,
                                                                                                                                       boolean autoDeleteOnStop,
                                                                                                                                       boolean staticService,
                                                                                                                                       java.util.Collection<ServiceRemoteInclusion> includes,
                                                                                                                                       java.util.Collection<ServiceTemplate> templates,
                                                                                                                                       java.util.Collection<ServiceDeployment> deployments,
                                                                                                                                       java.util.Collection<java.lang.String> groups,
                                                                                                                                       ProcessConfiguration processConfiguration,
                                                                                                                                       de.dytanic.cloudnet.common.document.gson.JsonDocument properties,
                                                                                                                                       java.lang.Integer port)
        Description copied from interface: CloudServiceFactory
        Creates and prepares a new cloud service
        Specified by:
        createCloudServiceAsync in interface CloudServiceFactory
        name - the name of the task of the new cloud service (the name of the service will be name-id)
        runtime - the runtime of the new cloud service (normally this is "jvm")
        autoDeleteOnStop - should the service be automatically deleted on stop?
        staticService - should the service be a static one?
        includes - the additional files that should be included when preparing the service
        templates - the templates that should be included when preparing the service
        deployments - the deployments that should be added to the service by default
        groups - the groups for the service
        processConfiguration - the process configuration for the service
        properties - the properties for the service (those are not used by the cloud, you can define whatever you want as the properties)
        port - the port of the service
        Returns:
        the info of the created service or null if the service couldn't be created