ninja.activeproxy.path
Class PathInstantiator

java.lang.Object
  |
  +--ninja.activeproxy.path.PathInstantiator

public class PathInstantiator
extends java.lang.Object

The PathInstantiator is responsible for taking a logical path (operators without specific machines to run on) and converting it to a physical path by choosing specific machines for the operators to run on. To do (11.19.99) - No failure recovery built in -- if an operator which the SDS say is available doesn't respond to rmi calls, we don't do anything. We should try to reinstantiate this operator, perhaps Update 1.17.00 SRM - Failure detection is handled by the io/PathInputStream and PathOutputStream stream wrappers. Failures at the instantiation level simply throw exceptions which the caller is expected to handle.


Constructor Summary
PathInstantiator()
           
 
Method Summary
static OperatorDescription instantiateOperator(OperatorDescription op)
          Instantiate one operator Finds available operators via SDS, not Xset (should be changed?) Overwrites any currently installed runtime structure in op.
private static boolean instantiateOpRandom(OperatorDescription op, java.util.Random r)
           
static PathDescription instantiatePath(PathDescription path)
          Instantiate the specified PathDescription with running instances of operators found via SDS.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

PathInstantiator

public PathInstantiator()
Method Detail

instantiatePath

public static PathDescription instantiatePath(PathDescription path)
Instantiate the specified PathDescription with running instances of operators found via SDS. We will preserve the runtime object of any already instantiated operators For now, just use SDS directory to find operators -- eventually, maybe we want to switch to a Xset based system? Limitations: - We don't notify Xset/SDS when an operator which was registered doesn't respond - We don't rebuild the path if a registered operator doesn't respond
Parameters:
path - The logical path to be instantiated
Returns:
The instantiated path, returns null if the path can't be instantiated

instantiateOperator

public static OperatorDescription instantiateOperator(OperatorDescription op)
Instantiate one operator Finds available operators via SDS, not Xset (should be changed?) Overwrites any currently installed runtime structure in op. This can be used to reinstantiate a single element of a path.
Parameters:
op - The operator to instantiate
Returns:
The instantiated operator, or null if instantiation failed

instantiateOpRandom

private static boolean instantiateOpRandom(OperatorDescription op,
                                           java.util.Random r)