public interface ModulesService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrentInstanceId()
Get the id of the current instance.
|
java.lang.String |
getCurrentModule()
Get the name of the current module.
|
java.lang.String |
getCurrentVersion()
Get the name of the current version.
|
java.lang.String |
getDefaultVersion(java.lang.String module)
Returns the name of the default version for the module.
|
java.lang.String |
getModuleHostname(java.lang.String module,
java.lang.String version)
Returns a hostname to use for the given module and version.
|
java.lang.String |
getModuleHostname(java.lang.String module,
java.lang.String version,
int instance)
Returns a hostname to use for the given module and version.
|
java.util.Set<java.lang.String> |
getModules()
Get the set of modules that are available to the application.
|
long |
getNumInstances(java.lang.String module,
java.lang.String version)
Returns the number of instances that are available to the given module and version.
|
java.util.Set<java.lang.String> |
getVersions(java.lang.String module)
Returns the set of versions that are available to the given module.
|
void |
setNumInstances(java.lang.String module,
java.lang.String version,
long instances)
Set the number of instances that are available to the given module and version.
|
void |
startModule(java.lang.String module,
java.lang.String version)
Start a given module and version.
|
void |
stopModule(java.lang.String module,
java.lang.String version)
Stop a given module and version.
|
java.lang.String getCurrentModule()
java.lang.String getCurrentVersion()
java.lang.String getCurrentInstanceId()
ModulesException
- when no instance id exists for the current instancejava.util.Set<java.lang.String> getModules()
ModulesException
- when an error occursjava.util.Set<java.lang.String> getVersions(java.lang.String module)
module
- the name of the moduleModulesException
- when input is invalidjava.lang.String getDefaultVersion(java.lang.String module)
module
- the name of the moduleModulesException
- when an error occurslong getNumInstances(java.lang.String module, java.lang.String version)
module
- the name of the moduleversion
- the name of the versionModulesException
- when input is invalidvoid setNumInstances(java.lang.String module, java.lang.String version, long instances)
module
- the name of the moduleversion
- the name of the versioninstances
- the number of instances to setModulesException
- when input is invalidvoid startModule(java.lang.String module, java.lang.String version)
module
- the name of the moduleversion
- the name of the versionModulesException
- when input or existing state is invalidvoid stopModule(java.lang.String module, java.lang.String version)
module
- the name of the moduleversion
- the name of the versionModulesException
- when input or existing state is invalidjava.lang.String getModuleHostname(java.lang.String module, java.lang.String version)
module
- the name of the module or null to indicate the current moduleversion
- the name of the version or null to indicate the current versionModulesException
- when input is invalidjava.lang.String getModuleHostname(java.lang.String module, java.lang.String version, int instance)
module
- the name of the module or null to indicate the current moduleversion
- the name of the version or null to indicate the current versioninstance
- the id of a particular instance to addressModulesException
- when input is invalid