com.bigdata.service.jini.master
Class DiscoverServices
java.lang.Object
com.bigdata.service.jini.master.DiscoverServices
- All Implemented Interfaces:
- Callable<net.jini.core.lookup.ServiceItem[]>
public class DiscoverServices
- extends Object
- implements Callable<net.jini.core.lookup.ServiceItem[]>
Class discovers and returns services matching a ServicesTemplate.
A number of instances of this class are submitted in parallel to verify
that the pre-conditions for the TaskMaster.JobState are satisified and to
return the ServiceItems for the IRemoteExecutors to
which the client tasks will be distributed.
- Version:
- $Id$
- Author:
- Bryan Thompson
|
Field Summary |
protected static org.apache.log4j.Logger |
log
|
|
Method Summary |
net.jini.core.lookup.ServiceItem[] |
call()
Return all matching services, waiting no longer than the timeout
specified to the ctor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final transient org.apache.log4j.Logger log
DiscoverServices
public DiscoverServices(JiniFederation fed,
ServicesTemplate servicesTemplate,
long timeout)
- Parameters:
fed - The JiniFederation, which is already handling
ServiceRegistrar discovery.servicesTemplate - The template to be matching, including the minimum #of
matches to be made.timeout - The timeout in milliseconds to await the minimum #of
matching services.
call
public net.jini.core.lookup.ServiceItem[] call()
throws Exception
- Return all matching services, waiting no longer than the timeout
specified to the ctor.
- Specified by:
call in interface Callable<net.jini.core.lookup.ServiceItem[]>
- Returns:
- All matching services. The caller can use as many as they
desire and is responsible for handling the case when fewer
services were matched than were requested.
- Throws:
Exception
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.