public interface ServiceManager
| Modifier and Type | Method and Description |
|---|---|
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 runnable,
int instances)
Changes the number of runnable instances.
|
void |
stop()
Stops the running service.
|
void setRunnableInstances(String runnable, int instances)
runnable - Name of the runnable (can be either handler or worker).instances - Number of instances to change to.int getRunnableInstances(String runnableName)
runnableName - Name of the runnable (can be either handler or worker).void stop()
boolean isRunning()
URL getServiceURL()
null if the service is not availableURL getServiceURL(long timeout, TimeUnit timeoutUnit)
timeout - how long to wait before giving up, in unit of timeoutUnittimeoutUnit - a TimeUnit to interpret the value of timeoutnull if the service is not availableCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.