appl.parallel.services
Class HostnameDiscoveryService

java.lang.Object
  extended by appl.parallel.services.HostnameDiscoveryService
All Implemented Interfaces:
DiscoveryService, Service

public class HostnameDiscoveryService
extends Object
implements DiscoveryService

Very simple Discovery Service that simply looks up hosts from Property

DiscoveryServices.hostname.hosts

of the XuluConfig

Refreshes the hostlist on every getResources(), if

DiscoveryServices.hostname.refresh

is set to 1, it gets the ips from Property

DiscoveryService.hostname.hosts

in XuluConfig

Author:
Dominik Appl

Constructor Summary
HostnameDiscoveryService()
           
 
Method Summary
 Vector<ComputingResourceContainer> getResources()
          gets resources, but pings them first to see if they are alive.
 Vector<StarterContainer> getStarterContainers()
           
 boolean isRunning()
           
 void refresh()
          tries to (re-)discover every resource in Property HostnameDiscoveryService.hosts of XuluConfig.
 void startService()
          Starts the service
 void stopService()
          stops the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostnameDiscoveryService

public HostnameDiscoveryService()
Method Detail

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Service
Returns:
true
See Also:
Service.isRunning()

startService

public void startService()
Description copied from interface: Service
Starts the service

Specified by:
startService in interface Service
See Also:
Service.startService()

stopService

public void stopService()
stops the service

Specified by:
stopService in interface Service

refresh

public void refresh()
tries to (re-)discover every resource in Property HostnameDiscoveryService.hosts of XuluConfig. After the time in ms specified in DiscoveryServices.timeout


getResources

public Vector<ComputingResourceContainer> getResources()
gets resources, but pings them first to see if they are alive. Not reachable resouces are removed.

Specified by:
getResources in interface DiscoveryService
Returns:
the discovered resources
See Also:
DiscoveryService.getResources()

getStarterContainers

public Vector<StarterContainer> getStarterContainers()
Returns:
starterContainers for XuluServerStarters