co.cask.cdap.test
Interface ServiceManager

All Known Implementing Classes:
DefaultServiceManager

public interface ServiceManager

Managing the running Service in an application.


Method Summary
 int getRunnableInstances(String runnableName)
          Returns the number of runnable instances.
 URL getServiceURL()
          Used to discover the Service managed by this ServiceManager.
 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.
 

Method Detail

setRunnableInstances

void setRunnableInstances(String runnable,
                          int instances)
Changes the number of runnable instances.

Parameters:
runnable - Name of the runnable (can be either handler or worker).
instances - Number of instances to change to.

getRunnableInstances

int getRunnableInstances(String runnableName)
Returns the number of runnable instances.

Parameters:
runnableName - Name of the runnable (can be either handler or worker).

stop

void stop()
Stops the running service.


isRunning

boolean isRunning()
Checks if Service is Running


getServiceURL

URL getServiceURL()
Used to discover the Service managed by this ServiceManager.

Returns:
URL of the Service


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.