UNICORE Resource Broker NJS Plugin
1.5α1

org.eurogrid.broker.server.dwdlm_example
Class DWDLMExpert

java.lang.Object
  |
  +--org.eurogrid.broker.server.dwdlm_example.DWDLMExpert
All Implemented Interfaces:
ExpertBroker, NamedPlugin

public class DWDLMExpert
extends Object
implements ExpertBroker

Expert brokering module that knows about the DWD Local Model code. Install like this:

 <expert class="org.eurogrid.broker.server.dwdlm_example.DWDLMExpert"/>
   <config gamma="?" r="?" epsilon="?" nboundlines="?"/>
   <vsite name="foo.bar" mflops="1" procsPerNode="1" xyPairs="1x1"/>
 </expert>
 
The vsite element may have an optional gateway attribute for specifying the gateway for reaching the Vsite; if not present, we assume we can use the same gateway as is used for reaching our host broker.

Version:
$Revision: 1.8 $, $Date: 2004/02/17 11:51:00 $
Author:
Donal K. Fellows, based on work by Jon MacLaren

Constructor Summary
DWDLMExpert()
           
 
Method Summary
 boolean evaluateQoSCheck(Object context, Vsite vsite, VsiteEstimateMap map, IncarnatedUser user)
          Perform a QoS check on the given Vsite (the local one.)
 boolean evaluateResourceCheck(Object context, Vsite vsite, VsiteTaskIDStatusMap map, IncarnatedUser user)
          Perform a resource check on the given Vsite (the local one.)
 boolean generateQoSRequests(Object context, Vsite vsite, List requests)
          Generate QoS requests to be made from the given Vsite (the local one) to whatever other ones are configured in the initialisation phase.
 boolean generateResourceRequests(Object context, Vsite vsite, List requests)
          Generate resource-check requests to be made from the given Vsite (the local one) to whatever other ones are configured in the initialisation phase.
 Object getContext(TaskResourceDAG dag)
          Given a task graph, get a context object for processing it.
 String getFormalName()
          Get the formal name of the plugin.
 String getName()
          Get the name of the plugin.
 void initialise(ResourceBroker broker, Logger logger, Element domNode)
          Initialise from the given DOM-tree element and broker configuration.
 boolean isEnabled()
          Test whether this expert brokering engine actually managed to initialise itself enough to operate.
 void willBroker(Object context)
          Informs the expert that the main broker has elected to use the expert for the job associated with the given context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DWDLMExpert

public DWDLMExpert()
Method Detail

evaluateQoSCheck

public boolean evaluateQoSCheck(Object context,
                                Vsite vsite,
                                VsiteEstimateMap map,
                                IncarnatedUser user)
Description copied from interface: ExpertBroker
Perform a QoS check on the given Vsite (the local one.)

Specified by:
evaluateQoSCheck in interface ExpertBroker
Parameters:
map - Place to store offers to make back to the client.

evaluateResourceCheck

public boolean evaluateResourceCheck(Object context,
                                     Vsite vsite,
                                     VsiteTaskIDStatusMap map,
                                     IncarnatedUser user)
Description copied from interface: ExpertBroker
Perform a resource check on the given Vsite (the local one.)

Specified by:
evaluateResourceCheck in interface ExpertBroker
Parameters:
map - Place to store offers to make back to the client.

generateQoSRequests

public boolean generateQoSRequests(Object context,
                                   Vsite vsite,
                                   List requests)
Description copied from interface: ExpertBroker
Generate QoS requests to be made from the given Vsite (the local one) to whatever other ones are configured in the initialisation phase. Note that it is up to the main broker to do the actual submission of the requests to the remote sites.

Specified by:
generateQoSRequests in interface ExpertBroker
Parameters:
requests - List that instances of CheckQoS should be added to.

generateResourceRequests

public boolean generateResourceRequests(Object context,
                                        Vsite vsite,
                                        List requests)
Description copied from interface: ExpertBroker
Generate resource-check requests to be made from the given Vsite (the local one) to whatever other ones are configured in the initialisation phase. Note that it is up to the main broker to do the actual submission of the requests to the remote sites.

Specified by:
generateResourceRequests in interface ExpertBroker
Parameters:
requests - List that instances of CheckResources should be added to.

getContext

public Object getContext(TaskResourceDAG dag)
Description copied from interface: ExpertBroker
Given a task graph, get a context object for processing it.

Specified by:
getContext in interface ExpertBroker
Returns:
If the value null is returned, this indicates that the module does not wish to broker the given job.

getFormalName

public String getFormalName()
Description copied from interface: NamedPlugin
Get the formal name of the plugin. This should be long enough to allow people who are not experts with the code to understand it, and will be written to the log to associate itself with the shorter name.

Specified by:
getFormalName in interface NamedPlugin

getName

public String getName()
Description copied from interface: NamedPlugin
Get the name of the plugin. This should be fairly short so that the logging messages aren't too massive.

Specified by:
getName in interface NamedPlugin

initialise

public void initialise(ResourceBroker broker,
                       Logger logger,
                       Element domNode)
Description copied from interface: ExpertBroker
Initialise from the given DOM-tree element and broker configuration.

Specified by:
initialise in interface ExpertBroker

isEnabled

public boolean isEnabled()
Description copied from interface: ExpertBroker
Test whether this expert brokering engine actually managed to initialise itself enough to operate.

Specified by:
isEnabled in interface ExpertBroker

willBroker

public void willBroker(Object context)
Description copied from interface: ExpertBroker
Informs the expert that the main broker has elected to use the expert for the job associated with the given context.

Specified by:
willBroker in interface ExpertBroker

UNICORE Resource Broker NJS Plugin
1.5α1

Submit a bug or feature
Copyright © 2002-2004 University of Manchester, U.K. See license.terms for details.