...
Let us take a look at each function in detail.
getCartridgeInfo
Anchor |
---|
| getCartridgeInfo |
---|
| getCartridgeInfo |
---|
|
Code Block |
---|
|
public CartridgeInfo getCartridgeInfo(String cartridgeType) throws UnregisteredCartridgeException; |
Method description
Calling this method will return information on the given cartridge if present, otherwise this will return a null
value.
Parameter description
Parameter | Description |
---|
cartridgeType | Type of the cartridge. |
Return value description
Return Value
| Description |
String | Information on the cartridge or a null value. |
Exception description
Exception Thrown | Description |
UnregisteredCartridgeException | Occurs when the cartridge type requested by this service is not registered.
|
getPendingInstanceCount
Anchor |
---|
| getPendingInstanceCount |
---|
| getPendingInstanceCount |
---|
|
Code Block |
---|
|
public int getPendingInstanceCount(String domainName, String subDomainName); |
Method description
Calling this method will result in returning the count of the pending instances of a particular domain.
Parameter description
Parameter | Description |
---|
domainName | Service domain of the instance |
subDomainName | Service clustering sub-domain. If this parameter is null, the default value will be used. The default value is DEFAULT_SUB_DOMAIN |
Return value description
Return Value
| Description |
---|
int | The number of pending instances for this domain is returned. This will return zero if there are no instances for this domain. |
getRegisteredCartridges
Anchor |
---|
| getRegisteredCartridges |
---|
| getRegisteredCartridges |
---|
|
Code Block |
---|
|
public String[] getRegisteredCartridges(); |
Method Description
Calling this method will result in returning the types of Cartridges registered in the Cloud Controller.
Return value description
Return Value
| Description |
String | This will return an array containing the types of registered cartridges. |
registerService
Anchor |
---|
| #registerService |
---|
| #registerService |
---|
|
Code Block |
---|
|
public boolean registerService(String domain, String subDomain, String tenantRange, String cartridgeType,
String hostName, Properties properties, byte[] payload) throws UnregisteredCartridgeException; |
Method description
A service cluster is uniquely identified by it's domain and sub-domain combination. This method registers the details of a newly created service cluster and it will override any existing service clusters.
Parameter description
Parameter | Description |
---|
domain | Service cluster domain. |
subDomain | Service cluster sub-domain. |
tenantRange | Tenant range (for example: '1-10' or '2'). |
cartridgeType | The registered cartridge type of the new service.
|
hostName | Host name of this service instance. |
properties | Set of properties related to this service definition. |
payload | The payload that is passed to the instance to be started. Payload shouldn't contain XML tags. |
Return value description
Return Value
| Description |
boolean | "True" or "false" is returned to indicate whether the registration is successful or not. |
Exception description
Exception Thrown | Description |
UnregisteredCartridgeException | Occurs when the cartridge type requested by this service is not registered.
|
startInstance
Anchor |
---|
| #startInstance |
---|
| #startInstance |
---|
|
Code Block |
---|
|
public String startInstance(String domainName, String subDomainName); |
Method description
An instance belonging to the provided service domain will be started up upon calling this method.
Info |
---|
The group name of the started up instance is derived from the service domain, by a replacing the the period (.) with a hyphen (-). |
Parameter description
Parameter | Description |
---|
domainName | The service clustering domain of the instance to be started up. |
subDomainName | The service clustering sub-domain of the instance to be started up. If this value is null the default value, which is DEFAULT_SUB_DOMAIN will be used. |
Return value description
Return Value
| Description |
String | The public IP which is associated with the newly started instance will be returned. |
terminateAllInstances
Anchor |
---|
| terminateAllInstances |
---|
| terminateAllInstances |
---|
|
Code Block |
---|
|
public boolean terminateAllInstances(String domainName, String subDomainName); |
Method Description
Calling this method will result in the termination of all instances belonging to the provided service domain and sub-domain.
Parameter description
Parameter | Description |
---|
domainName | Service domain of the instance to be terminated. |
subDomainName | Service clustering sub-domain of the instance to be terminated. If this parameter is null the default value, which is DEFAULT_SUB_DOMAIN will be used. |
Return value description
Return Value
| Description |
boolean | "True" or "false" will be returned to indicate whether all the instances were terminated successfully or not. |
terminateInstance
Anchor |
---|
| terminateInstance |
---|
| terminateInstance |
---|
|
Code Block |
---|
|
public boolean terminateInstance(String domainName, String subDomainName); |
Method description
Calling this method results in the termination of an instance belonging to the provided service domain and sub-domain .
Parameter description
Parameter | Description |
---|
domainName | Service domain of the instance to be terminated. |
subDomainName | Service clustering sub-domain of the instance to be terminated. If this parameter is null the default value, which is DEFAULT_SUB_DOMAIN will be used. |
Return value description
Return Value
| Description |
boolean | "True" or "false" will be returned to indicate whether an instance was terminated successfully or not. |
terminateLastlySpawnedInstance
Anchor |
---|
| terminateLastlySpawnedInstance |
---|
| terminateLastlySpawnedInstance |
---|
|
Code Block |
---|
|
public boolean terminateLastlySpawnedInstance(String domainName, String subDomainName); |
Method description
Calling this method will result in the termination of the lastly spawned instance that belongs to the service domain and sub-domain provided .
Parameter description
Parameter | Description |
---|
domainName | Service domain of the instance to be terminated. |
subDomainName | Service clustering sub-domain of the instance to be terminated. If this parameter is null the default value, which is DEFAULT_SUB_DOMAIN will be used. |
Return value description
Return Value
| Description |
boolean | "True" or "false" will be returned to indicate whether the termination was successfully or not. |
unregisterService
Anchor |
---|
| unregisterService |
---|
| unregisterService |
---|
|
Code Block |
---|
|
public boolean unregisterService(String domain, String subDomain) throws UnregisteredServiceException; |
Method description
Calling this method will result in deregistering the service cluster that is represented by the mentioned domain and sub-domain .
Parameter description
Parameter | Description |
---|
domain | Service cluster domain. |
subDomain | Service clustering sub-domain. |
Return value description
Return Value
| Description |
boolean | "True" or "false" will be returned to indicate whether the De-registration was successfully or not. |
Exception description
Exception Thrown | Description |
UnregisteredServiceException | Occurs when the requested service cluster has not been registered. |