com.enioka.jqm.model.Node.create()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.enioka.jqm.model.Node.create()方法的一些代码示例,展示了Node.create()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.create()方法的具体详情如下:
包路径:com.enioka.jqm.model.Node
类名称:Node
方法名:create

Node.create介绍

[英]Create a new entry in the database. No commit performed.
[中]在数据库中创建一个新条目。未执行任何提交。

代码示例

代码示例来源:origin: enioka/jqm

/**
 * Create a new node. It is not started by this method.<br>
 * This must be called before starting the tester.
 * 
 * @param nodeName
 *            the name of the node. Must be unique.
 */
public JqmAsyncTester addNode(String nodeName)
{
  if (hasStarted)
  {
    throw new IllegalStateException("tester has already started");
  }
  File resDirectoryPath = Common.createTempDirectory();
  Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test",
      logLevel);
  cnx.commit();
  nodes.put(nodeName, node);
  setNodesLogLevel(logLevel);
  return this;
}

代码示例来源:origin: com.enioka.jqm/jqm-tst

/**
 * Create a new node. It is not started by this method.<br>
 * This must be called before starting the tester.
 * 
 * @param nodeName
 *            the name of the node. Must be unique.
 */
public JqmAsyncTester addNode(String nodeName)
{
  if (hasStarted)
  {
    throw new IllegalStateException("tester has already started");
  }
  File resDirectoryPath = Common.createTempDirectory();
  Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test",
      logLevel);
  cnx.commit();
  nodes.put(nodeName, node);
  setNodesLogLevel(logLevel);
  return this;
}

代码示例来源:origin: com.enioka.jqm/jqm-engine

nodeId = Node.create(cnx, nodeName, port, System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/jobs/",
    System.getProperty("user.dir") + "/tmp/", "localhost", "INFO").getId();
cnx.commit();

代码示例来源:origin: enioka/jqm

nodeId = Node.create(cnx, nodeName, port, System.getProperty("user.dir") + "/jobs/", System.getProperty("user.dir") + "/jobs/",
    System.getProperty("user.dir") + "/tmp/", "localhost", "INFO").getId();
cnx.commit();

代码示例来源:origin: enioka/jqm

node = Node.create(cnx, "testtempnode", 12, resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(),
    resDirectoryPath.getAbsolutePath(), "test", "INFO");

代码示例来源:origin: com.enioka.jqm/jqm-tst

node = Node.create(cnx, "testtempnode", 12, resDirectoryPath.getAbsolutePath(), resDirectoryPath.getAbsolutePath(),
    resDirectoryPath.getAbsolutePath(), "test", "INFO");

代码示例来源:origin: com.enioka.jqm/jqm-test-helpers

TestHelpers.node = Node.create(cnx, "localhost", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.node2 = Node.create(cnx, "localhost2", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.node3 = Node.create(cnx, "localhost3", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.nodeMix = Node.create(cnx, "localhost4", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.nodeMix2 = Node.create(cnx, "localhost5", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");

代码示例来源:origin: enioka/jqm

TestHelpers.node = Node.create(cnx, "localhost", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.node2 = Node.create(cnx, "localhost2", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.node3 = Node.create(cnx, "localhost3", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.nodeMix = Node.create(cnx, "localhost4", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");
TestHelpers.nodeMix2 = Node.create(cnx, "localhost5", 0, "./target/outputfiles/", "./../", "./target/tmp", dns, "DEBUG");

代码示例来源:origin: enioka/jqm

null, "Franquin", "ModuleMachin", "other", "other", false, cnx);
Node n0 = Node.create(cnx, "n0", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n1 = Node.create(cnx, "n1", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n2 = Node.create(cnx, "n2", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n3 = Node.create(cnx, "n3", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n4 = Node.create(cnx, "n4", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n5 = Node.create(cnx, "n5", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n6 = Node.create(cnx, "n6", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n7 = Node.create(cnx, "n7", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n8 = Node.create(cnx, "n8", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
Node n9 = Node.create(cnx, "n9", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");

代码示例来源:origin: com.enioka.jqm/jqm-admin

public static void upsertNode(DbConn cnx, NodeDto dto)
{
  if (dto.getId() != null)
  {
    QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
        dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
        dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
        dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
        dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
        dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
    if (qr.nbUpdated != 1)
    {
      jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
    }
  }
  else
  {
    // Should actually never be used... nodes should be created through CLI.
    Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
        dto.getDns(), dto.getRootLogLevel());
  }
}

代码示例来源:origin: enioka/jqm

public static void upsertNode(DbConn cnx, NodeDto dto)
{
  if (dto.getId() != null)
  {
    QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
        dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
        dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
        dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
        dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
        dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
    if (qr.nbUpdated != 1)
    {
      jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
    }
  }
  else
  {
    // Should actually never be used... nodes should be created through CLI.
    Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
        dto.getDns(), dto.getRootLogLevel());
  }
}

相关文章