com.addthis.hydra.data.query.Query.getQueryPaths()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(100)

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

Query.getQueryPaths介绍

暂无

代码示例

代码示例来源:origin: addthis/hydra

/**
 * Performs a query search, writes the results to a data channel. This function does not break the execution of the
 * query if the client channel gets closed.
 *
 * @param query    A Query object that contains the path or paths of the root query.
 * @param result   A DataChannelOutput to which the result will be written. In practice, this will be the head of
 *                 a QueryOpProcessor that represents the first operator in a query, which in turn sends its output
 *                 to another QueryOpProcessor and the last will send its output to a DataChannelOutput sending bytes
 *                 back to meshy, usually defined at the MQSource side of code.
 * @param queryPromise A wrapper for a boolean flag that gets set to true by MQSource in case the user
 *                 cancels the query at the MQMaster side.
 */
public void search(Query query, DataChannelOutput result,
    ChannelProgressivePromise queryPromise) throws QueryException {
  for (QueryElement[] path : query.getQueryPaths()) {
    if (!(queryPromise.isDone())) {
      search(path, result, queryPromise);
    }
  }
}

代码示例来源:origin: addthis/hydra

@Test
public void testCompact() {
  String path = "+:+hits,+nodes$+foo=123/+/++123/+%top=hit/a,b,c/|foo/|+bar/*/+%goo/(1-5)+";
  Query q = new Query("job", new String[] { path }, null);
  Assert.assertEquals(path, q.getPathString(q.getQueryPaths().get(0)));
}

相关文章