Package org.jamesii.core.experiments.tasks.stoppolicy.plugintype

Examples of org.jamesii.core.experiments.tasks.stoppolicy.plugintype.ComputationTaskStopPolicyFactory


    pb.addSubBlock(ComputationTaskStopPolicyFactory.COMPTASK, this);

    // It is necessary to consult the registry here (so that it, e.g., can
    // document which stop policy was chosen)
    pb.setValue(config.getStopPolicyFactoryClass().getCanonicalName());
    ComputationTaskStopPolicyFactory stopPolicyFactory =
        SimSystem.getRegistry().getFactory(
            AbstractComputationTaskStopPolicyFactory.class, pb);

    // In case the selection of the intended factory fails, choose the one that
    // was configured originally
    if (!stopPolicyFactory.getClass()
        .equals(config.getStopPolicyFactoryClass())) {
      try {
        stopPolicyFactory = config.getStopPolicyFactoryClass().newInstance();
      } catch (InstantiationException | IllegalAccessException e) {
        SimSystem.report(Level.SEVERE,
            "Could not initialize stop policy factory.", e);
      }
    }

    simRunStopPolicy = stopPolicyFactory.create(pb, SimSystem.getRegistry().createContext());

  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.experiments.tasks.stoppolicy.plugintype.ComputationTaskStopPolicyFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.