Examples of ThreadSchedulerConfiguration


Examples of com.esri.gpt.framework.scheduler.ThreadSchedulerConfiguration

*/
private void loadScheduler(ApplicationConfiguration appConfig, Document dom,
    Node root) throws XPathExpressionException {

  XPath xpath = XPathFactory.newInstance().newXPath();
  ThreadSchedulerConfiguration tsConfig = appConfig.getThreadSchedulerConfiguration();
  Node ndScheduler = (Node) xpath.evaluate("scheduler", root,
      XPathConstants.NODE);
  if (ndScheduler == null) {
    return;
  }

  // primary parameters
  tsConfig.setActive(Val.chkBool(xpath.evaluate("@active", ndScheduler), false));
  tsConfig.setCorePoolSize(Val.chkInt(xpath.evaluate("@corePoolSize",
      ndScheduler), 0));

  // threads
  NodeList nlThreads = (NodeList) xpath.evaluate("thread", ndScheduler,
      XPathConstants.NODESET);
  for (int i = 0; i < nlThreads.getLength(); i++) {
    Node ndThread = nlThreads.item(i);
    String sClass = Val.chkStr(xpath.evaluate("@class", ndThread));
    String sDelay = Val.chkStr(xpath.evaluate("@delay", ndThread));
    String sPeriod = Val.chkStr(xpath.evaluate("@period", ndThread));
    String sAt = Val.chkStr(xpath.evaluate("@at", ndThread));

    // read parameters
    StringAttributeMap parameters = new StringAttributeMap();
    populateParameters(parameters, ndThread);

    // add definition
    tsConfig.addDefinition(sClass, sDelay, sPeriod, sAt, parameters);
  }
}
View Full Code Here

Examples of com.esri.gpt.framework.scheduler.ThreadSchedulerConfiguration

  super();
  setDatabaseReferences(new DatabaseReferences());
  setIdentityConfiguration(new IdentityConfiguration());
  setCatalogConfiguration(new CatalogConfiguration());
  setMailConfiguration(new MailConfiguration());
  setThreadSchedulerConfiguration(new ThreadSchedulerConfiguration());
  setDownloadDataConfiguration(new DownloadConfiguration());
  setMetadataAccessPolicy(new MetadataAccessPolicy());
}
View Full Code Here

Examples of com.esri.gpt.framework.scheduler.ThreadSchedulerConfiguration

*/
private void setThreadSchedulerConfiguration(
    ThreadSchedulerConfiguration configuration) {
  _threadSchedulerConfiguration = configuration;
  if (_threadSchedulerConfiguration == null) {
    _threadSchedulerConfiguration = new ThreadSchedulerConfiguration();
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.