com.enioka.jqm.api.Query.setParentId()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(104)

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

Query.setParentId介绍

[英]Some job instances are launched by other job instances (linked jobs which launch one another). This allows to query all job instances launched by a specific job instance.
[中]某些作业实例由其他作业实例(相互启动的链接作业)启动。这允许查询特定作业实例启动的所有作业实例。

代码示例

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

@Override
public void waitChildren()
{
  JqmClient c = getJqmClient();
  Query q = Query.create().setQueryHistoryInstances(false).setQueryLiveInstances(true).setParentId(ji.getId());
  while (!c.getJobs(q).isEmpty())
  {
    try
    {
      Thread.sleep(1000);
      handleInstructions();
    }
    catch (InterruptedException e)
    {
      Thread.currentThread().interrupt();
      break;
    }
  }
}

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

@Override
public void waitChildren()
{
  JqmClient c = getJqmClient();
  Query q = Query.create().setQueryHistoryInstances(false).setQueryLiveInstances(true).setParentId(ji.getId());
  while (!c.getJobs(q).isEmpty())
  {
    try
    {
      Thread.sleep(1000);
      handleInstructions();
    }
    catch (InterruptedException e)
    {
      Thread.currentThread().interrupt();
      break;
    }
  }
}

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

Assert.assertEquals(0, TestHelpers.getNonOkCount(cnx));
List<JobInstance> jis = Query.create().setParentId(i).run();
Assert.assertEquals(1, jis.size());

相关文章