|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectco.cask.cdap.test.internal.DefaultServiceManager
public class DefaultServiceManager
A default implementation of ServiceManager.
| Constructor Summary | |
|---|---|
DefaultServiceManager(String accountId,
co.cask.cdap.test.internal.DefaultApplicationManager.ProgramId serviceId,
AppFabricClient appFabricClient,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
DefaultApplicationManager applicationManager)
|
|
| Method Summary | |
|---|---|
int |
getRunnableInstances(String runnableName)
Returns the number of runnable instances. |
URL |
getServiceURL()
Used to discover the Service managed by this ServiceManager. |
URL |
getServiceURL(long timeout,
TimeUnit timeoutUnit)
Used to discover the Service managed by this ServiceManager which allows a custom timeout value to wait for the service to be available. |
boolean |
isRunning()
Checks if Service is Running |
void |
setRunnableInstances(String runnableName,
int instances)
Changes the number of runnable instances. |
void |
stop()
Stops the running service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultServiceManager(String accountId,
co.cask.cdap.test.internal.DefaultApplicationManager.ProgramId serviceId,
AppFabricClient appFabricClient,
org.apache.twill.discovery.DiscoveryServiceClient discoveryServiceClient,
DefaultApplicationManager applicationManager)
| Method Detail |
|---|
public void setRunnableInstances(String runnableName,
int instances)
ServiceManager
setRunnableInstances in interface ServiceManagerrunnableName - Name of the runnable (can be either handler or worker).instances - Number of instances to change to.public int getRunnableInstances(String runnableName)
ServiceManager
getRunnableInstances in interface ServiceManagerrunnableName - Name of the runnable (can be either handler or worker).public void stop()
ServiceManager
stop in interface ServiceManagerpublic boolean isRunning()
ServiceManager
isRunning in interface ServiceManagerpublic URL getServiceURL()
ServiceManager
getServiceURL in interface ServiceManagernull if the service is not available
public URL getServiceURL(long timeout,
TimeUnit timeoutUnit)
ServiceManager
getServiceURL in interface ServiceManagertimeout - how long to wait before giving up, in unit of timeoutUnittimeoutUnit - a TimeUnit to interpret the value of timeout
null if the service is not available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||