Interface ModulesController
- All Known Implementing Classes:
Modules,Modules,ModulesEE8
public interface ModulesController
Modules query and control operations needed by the ModulesService.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnum for tracking the state of a module (running/stopped). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultVersion(String moduleName) Returns the default version for a named module.getHostname(String moduleName, String version, int instance) Returns the host name of the requested module version instance.Returns all the known module names.getModuleState(String moduleName) Returns the current state of this module.intgetNumInstances(String moduleName, String version) Returns the number of instances for the requested module version.getScalingType(String moduleName) Returns the type of scaling in use for this module.getVersions(String moduleName) Returns all known versions of the requested module.voidsetNumInstances(String moduleName, String version, int numInstances) Sets the number of instances for the requested module version.voidstartModule(String moduleName, String version) Starts the requested module version.voidstopModule(String moduleName, String version) Stops the requested module version.
-
Field Details
-
MODULES_CONTROLLER_ATTRIBUTE_KEY
- See Also:
-
-
Method Details
-
getModuleNames
Returns all the known module names. -
getVersions
Returns all known versions of the requested module.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured
-
getDefaultVersion
Returns the default version for a named module.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured
-
getNumInstances
Returns the number of instances for the requested module version.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured and.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUEif the requested version is not configured.
-
setNumInstances
void setNumInstances(String moduleName, String version, int numInstances) throws ApiProxy.ApplicationException Sets the number of instances for the requested module version.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured and.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUEif the requested version is not configured for setting instances.ErrorCode#INVALID_INSTANCESif numInstances is not a legal value.
-
getHostname
String getHostname(String moduleName, String version, int instance) throws ApiProxy.ApplicationException Returns the host name of the requested module version instance.- Parameters:
moduleName- the moduleName whose host we return.version- the version whose host we return.instance- the instance whose host we return orinvalid reference
.tools.development.LocalEnvironment#MAIN_INSTANCE- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured and.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUEif the requested version is not configured and.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_INSTANCES_VALUEif the requested instance is not configured.
-
startModule
Starts the requested module version.- Throws:
ApiProxy.ApplicationException-.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not a configured manual scaling module and.ErrorCode#INVALID_VERSION_VALUEif the requested version is not configured or is not a manual scaling module and.ModulesServiceError.ErrorCode#UNEXPECTED_STATEif the module instance is not stopped and ready to be started.
-
stopModule
Stops the requested module version.- Throws:
ApiProxy.ApplicationException-.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not a configured manual scaling module and.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUEif the requested version is not configured or is not a manual scaling module and.ErrorCode#UNEXPECTED_STATEif the module instance is not running and ready to be stopped.
-
getScalingType
Returns the type of scaling in use for this module.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured
-
getModuleState
ModulesController.ModuleState getModuleState(String moduleName) throws ApiProxy.ApplicationException Returns the current state of this module.- Throws:
ApiProxy.ApplicationException- with error code.modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUEif the requested module is not configured
-