|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.jini.master.ServiceMap
public class ServiceMap
An ordered mapping of indices in [0:N-1] onto the services on
which the task with the corresponding index will be executed.
If the ServiceItem to client# assignment can change over time
then we need to use a lock to make that change atomic with respect to
requests for the client's proxy.
| Field Summary | |
|---|---|
int |
ntasks
The #of tasks to be mapped over the services. |
UUID[] |
serviceUUIDs
The mapping of tasks onto the IRemoteExecutors on which
that task will execute. |
| Constructor Summary | |
|---|---|
ServiceMap(int ntasks)
|
|
| Method Summary | |
|---|---|
void |
assignClientsToServices(net.jini.core.lookup.ServiceItem[] serviceItems)
Assigns clients to services. |
net.jini.core.lookup.ServiceItem |
getServiceItem(int clientNum)
Return the ServiceItem of the service to which the Nth client
was assigned. |
UUID |
getServiceUUID(int clientNum)
Return the UUID of the service to which the Nth client was
assigned. |
void |
resolveServiceUUIDs(JiniFederation fed)
Populates the elements of the serviceItems array by
resolving the serviceUUIDs to the corresponding
ServiceItems. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int ntasks
public final UUID[] serviceUUIDs
IRemoteExecutors on which
that task will execute. The index is the task#. The value is the
IRemoteExecutor service UUID.
| Constructor Detail |
|---|
public ServiceMap(int ntasks)
ntasks - The #of tasks to be mapped over the services.| Method Detail |
|---|
public void resolveServiceUUIDs(JiniFederation fed)
throws RemoteException,
InterruptedException
serviceItems array by
resolving the serviceUUIDs to the corresponding
ServiceItems. For each service, this tests the service cache
for IClientServices and IDataServices and only then
does a lookup with a timeout for the service.
InterruptedException - If interrupted during service lookup.
RemoteException - If there is an RMI problem.
public void assignClientsToServices(net.jini.core.lookup.ServiceItem[] serviceItems)
throws Exception
serviceItems - The ordered array of services to which each client will be
assigned.
Exceptionpublic UUID getServiceUUID(int clientNum)
UUID of the service to which the Nth client was
assigned.
clientNum - The client number in [0:N-1].
UUID of the service on which that client should
execute.public net.jini.core.lookup.ServiceItem getServiceItem(int clientNum)
ServiceItem of the service to which the Nth client
was assigned.
clientNum - The client number in [0:N-1].
ServiceItem of the service on which that client
should execute.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||