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.util.concurrent.Future<java.lang.String> |
getDefaultVersionAsync(java.lang.String module)
Returns a
Future for an asynchronous call to getDefaultVersion(java.lang.String) . |
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.concurrent.Future<java.lang.String> |
getModuleHostnameAsync(java.lang.String module,
java.lang.String version)
Returns a
Future for an asynchronous call to
getModuleHostname(String, String) . |
java.util.concurrent.Future<java.lang.String> |
getModuleHostnameAsync(java.lang.String module,
java.lang.String version,
int instance)
Returns a
Future for an asynchronous call to
getModuleHostname(String, String, int) . |
java.util.Set<java.lang.String> |
getModules()
Get the set of modules that are available to the application.
|
java.util.concurrent.Future<java.util.Set<java.lang.String>> |
getModulesAsync()
Returns a
Future for an asynchronous call to getModules() . |
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.concurrent.Future<java.lang.Long> |
getNumInstancesAsync(java.lang.String module,
java.lang.String version)
Returns a
Future for an asynchronous call to getNumInstances(java.lang.String, java.lang.String) . |
java.util.Set<java.lang.String> |
getVersions(java.lang.String module)
Returns the set of versions that are available to the given module.
|
java.util.concurrent.Future<java.util.Set<java.lang.String>> |
getVersionsAsync(java.lang.String module)
Returns a
Future for an asynchronous call to getVersions(java.lang.String) . |
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.
|
java.util.concurrent.Future<java.lang.Void> |
setNumInstancesAsync(java.lang.String module,
java.lang.String version,
long instances)
Returns a
Future for an asynchronous call to setNumInstances(java.lang.String, java.lang.String, long) . |
void |
startModule(java.lang.String module,
java.lang.String version)
Start a given module and version.
|
java.util.concurrent.Future<java.lang.Void> |
startModuleAsync(java.lang.String module,
java.lang.String version)
Returns a
Future for an asynchronous call to startModule(java.lang.String, java.lang.String) . |
void |
stopModule(java.lang.String module,
java.lang.String version)
Stop a given module and version.
|
java.util.concurrent.Future<java.lang.Void> |
stopModuleAsync(java.lang.String module,
java.lang.String version)
Returns a
Future for an asynchronous call to stopModule(java.lang.String, java.lang.String) . |
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.concurrent.Future<java.util.Set<java.lang.String>> getModulesAsync()
Future
for an asynchronous call to getModules()
.java.util.Set<java.lang.String> getVersions(java.lang.String module)
module
- the name of the moduleModulesException
- when input is invalidjava.util.concurrent.Future<java.util.Set<java.lang.String>> getVersionsAsync(java.lang.String module)
Future
for an asynchronous call to getVersions(java.lang.String)
.java.lang.String getDefaultVersion(java.lang.String module)
module
- the name of the moduleModulesException
- when an error occursjava.util.concurrent.Future<java.lang.String> getDefaultVersionAsync(java.lang.String module)
Future
for an asynchronous call to getDefaultVersion(java.lang.String)
.long getNumInstances(java.lang.String module, java.lang.String version)
module
- the name of the moduleversion
- the name of the versionModulesException
- when input is invalidjava.util.concurrent.Future<java.lang.Long> getNumInstancesAsync(java.lang.String module, java.lang.String version)
Future
for an asynchronous call to getNumInstances(java.lang.String, java.lang.String)
.void 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 invalidjava.util.concurrent.Future<java.lang.Void> setNumInstancesAsync(java.lang.String module, java.lang.String version, long instances)
Future
for an asynchronous call to setNumInstances(java.lang.String, java.lang.String, long)
.void 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 invalidjava.util.concurrent.Future<java.lang.Void> startModuleAsync(java.lang.String module, java.lang.String version)
Future
for an asynchronous call to startModule(java.lang.String, java.lang.String)
.void 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.util.concurrent.Future<java.lang.Void> stopModuleAsync(java.lang.String module, java.lang.String version)
Future
for an asynchronous call to stopModule(java.lang.String, java.lang.String)
.java.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.util.concurrent.Future<java.lang.String> getModuleHostnameAsync(java.lang.String module, java.lang.String version)
Future
for an asynchronous call to
getModuleHostname(String, String)
.java.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 invalidjava.util.concurrent.Future<java.lang.String> getModuleHostnameAsync(java.lang.String module, java.lang.String version, int instance)
Future
for an asynchronous call to
getModuleHostname(String, String, int)
.