com.metamatrix.server
Class HostController

java.lang.Object
  extended by com.metamatrix.server.HostController
All Implemented Interfaces:
HostManagement

public class HostController
extends java.lang.Object
implements HostManagement


Constructor Summary
HostController(Host host, ClusteredRegistryState registry, HostMonitor hostMonitor, MessageBus bus)
           
 
Method Summary
 void bounceAllServersInCluster()
          Kill and re-start all the servers in the cluster
 void bounceServers(java.lang.String hostName)
          Kill and restart all the servers on this host
 void killAllServersInCluster()
          Kill all the servers at all the hosts
 void killServer(java.lang.String hostName, java.lang.String processName, boolean stopNow)
          Kill the server process on this host with specified processName
 void killServers(java.lang.String hostName, boolean stopNow)
          Kill all servers on a this host
static void main(java.lang.String[] args)
           
 boolean ping(java.lang.String hostName)
          Ping the local host controller
 boolean pingServer(java.lang.String hostName, java.lang.String processName)
          Ping the server process on this host with given processName.
 void run(boolean startProcesses)
           
 void shutdown(java.lang.String hostName)
          Kill the host controller; this will also kill all the server processes on this host.
 void shutdownCluster()
          shutdown all the host controllers and all the servers processes
 void startAllServersInCluster()
          Start all servers in the all the hosts
 void startServer(java.lang.String hostName, java.lang.String processName)
          Start a server process on this host with specified processName
 void startServers(java.lang.String hostName)
          Start all servers on the given host;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostController

public HostController(Host host,
                      ClusteredRegistryState registry,
                      HostMonitor hostMonitor,
                      MessageBus bus)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

run

public void run(boolean startProcesses)
         throws java.lang.Throwable
Throws:
java.lang.Throwable

main

public static void main(java.lang.String[] args)

killServer

public void killServer(java.lang.String hostName,
                       java.lang.String processName,
                       boolean stopNow)
                throws MetaMatrixComponentException
Description copied from interface: HostManagement
Kill the server process on this host with specified processName

Specified by:
killServer in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
Throws:
MetaMatrixComponentException

killServers

public void killServers(java.lang.String hostName,
                        boolean stopNow)
                 throws MetaMatrixComponentException
Description copied from interface: HostManagement
Kill all servers on a this host

Specified by:
killServers in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
stopNow - - true if need to be stopped immediately
Throws:
MetaMatrixComponentException

ping

public boolean ping(java.lang.String hostName)
Description copied from interface: HostManagement
Ping the local host controller

Specified by:
ping in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
Returns:
true if available; false otherwise

pingServer

public boolean pingServer(java.lang.String hostName,
                          java.lang.String processName)
Description copied from interface: HostManagement
Ping the server process on this host with given processName.

Specified by:
pingServer in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
Returns:
true if available; false otherwise

shutdown

public void shutdown(java.lang.String hostName)
              throws MetaMatrixComponentException
Description copied from interface: HostManagement
Kill the host controller; this will also kill all the server processes on this host.

Specified by:
shutdown in interface HostManagement
Throws:
MetaMatrixComponentException

shutdownCluster

public void shutdownCluster()
                     throws MetaMatrixComponentException
Description copied from interface: HostManagement
shutdown all the host controllers and all the servers processes

Specified by:
shutdownCluster in interface HostManagement
Throws:
MetaMatrixComponentException

startServer

public void startServer(java.lang.String hostName,
                        java.lang.String processName)
                 throws MetaMatrixComponentException
Description copied from interface: HostManagement
Start a server process on this host with specified processName

Specified by:
startServer in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
processName - - virtual machine name
Throws:
MetaMatrixComponentException

startServers

public void startServers(java.lang.String hostName)
                  throws MetaMatrixComponentException
Description copied from interface: HostManagement
Start all servers on the given host;

Specified by:
startServers in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
Throws:
MetaMatrixComponentException

bounceAllServersInCluster

public void bounceAllServersInCluster()
Description copied from interface: HostManagement
Kill and re-start all the servers in the cluster

Specified by:
bounceAllServersInCluster in interface HostManagement

bounceServers

public void bounceServers(java.lang.String hostName)
                   throws MetaMatrixComponentException
Description copied from interface: HostManagement
Kill and restart all the servers on this host

Specified by:
bounceServers in interface HostManagement
Parameters:
hostName - - name of the host; can not be null
Throws:
MetaMatrixComponentException

killAllServersInCluster

public void killAllServersInCluster()
Description copied from interface: HostManagement
Kill all the servers at all the hosts

Specified by:
killAllServersInCluster in interface HostManagement

startAllServersInCluster

public void startAllServersInCluster()
Description copied from interface: HostManagement
Start all servers in the all the hosts

Specified by:
startAllServersInCluster in interface HostManagement


Copyright © 2009. All Rights Reserved.