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

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

本文整理了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

  1. /**
  2. * Create a new node. It is not started by this method.<br>
  3. * This must be called before starting the tester.
  4. *
  5. * @param nodeName
  6. * the name of the node. Must be unique.
  7. */
  8. public JqmAsyncTester addNode(String nodeName)
  9. {
  10. if (hasStarted)
  11. {
  12. throw new IllegalStateException("tester has already started");
  13. }
  14. File resDirectoryPath = Common.createTempDirectory();
  15. Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test",
  16. logLevel);
  17. cnx.commit();
  18. nodes.put(nodeName, node);
  19. setNodesLogLevel(logLevel);
  20. return this;
  21. }

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

  1. /**
  2. * Create a new node. It is not started by this method.<br>
  3. * This must be called before starting the tester.
  4. *
  5. * @param nodeName
  6. * the name of the node. Must be unique.
  7. */
  8. public JqmAsyncTester addNode(String nodeName)
  9. {
  10. if (hasStarted)
  11. {
  12. throw new IllegalStateException("tester has already started");
  13. }
  14. File resDirectoryPath = Common.createTempDirectory();
  15. Node node = Node.create(cnx, nodeName, 12, resDirectoryPath.getAbsolutePath(), ".", resDirectoryPath.getAbsolutePath(), "test",
  16. logLevel);
  17. cnx.commit();
  18. nodes.put(nodeName, node);
  19. setNodesLogLevel(logLevel);
  20. return this;
  21. }

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. null, "Franquin", "ModuleMachin", "other", "other", false, cnx);
  2. Node n0 = Node.create(cnx, "n0", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  3. Node n1 = Node.create(cnx, "n1", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  4. Node n2 = Node.create(cnx, "n2", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  5. Node n3 = Node.create(cnx, "n3", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  6. Node n4 = Node.create(cnx, "n4", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  7. Node n5 = Node.create(cnx, "n5", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  8. Node n6 = Node.create(cnx, "n6", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  9. Node n7 = Node.create(cnx, "n7", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  10. Node n8 = Node.create(cnx, "n8", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");
  11. Node n9 = Node.create(cnx, "n9", 0, "./target/outputfiles/", "./../", "./target/tmp", "localhost", "INFO");

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

  1. public static void upsertNode(DbConn cnx, NodeDto dto)
  2. {
  3. if (dto.getId() != null)
  4. {
  5. QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
  6. dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
  7. dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
  8. dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
  9. dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
  10. dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
  11. if (qr.nbUpdated != 1)
  12. {
  13. jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
  14. }
  15. }
  16. else
  17. {
  18. // Should actually never be used... nodes should be created through CLI.
  19. Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
  20. dto.getDns(), dto.getRootLogLevel());
  21. }
  22. }

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

  1. public static void upsertNode(DbConn cnx, NodeDto dto)
  2. {
  3. if (dto.getId() != null)
  4. {
  5. QueryResult qr = cnx.runUpdate("node_update_changed_by_id", dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(),
  6. dto.getJmxRegistryPort(), dto.getJmxServerPort(), dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(),
  7. dto.getName(), dto.getPort(), dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory(),
  8. dto.getId(), dto.getOutputDirectory(), dto.getDns(), dto.getEnabled(), dto.getJmxRegistryPort(), dto.getJmxServerPort(),
  9. dto.getLoadApiAdmin(), dto.getLoadApiClient(), dto.getLoapApiSimple(), dto.getName(), dto.getPort(),
  10. dto.getJobRepoDirectory(), dto.getRootLogLevel(), dto.getStop(), dto.getTmpDirectory());
  11. if (qr.nbUpdated != 1)
  12. {
  13. jqmlogger.debug("No update was done as object either does not exist or no modifications were done");
  14. }
  15. }
  16. else
  17. {
  18. // Should actually never be used... nodes should be created through CLI.
  19. Node.create(cnx, dto.getName(), dto.getPort(), dto.getOutputDirectory(), dto.getJobRepoDirectory(), dto.getTmpDirectory(),
  20. dto.getDns(), dto.getRootLogLevel());
  21. }
  22. }

相关文章