本文整理了Java中org.elasticsearch.common.unit.TimeValue.millisFrac()
方法的一些代码示例,展示了TimeValue.millisFrac()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TimeValue.millisFrac()
方法的具体详情如下:
包路径:org.elasticsearch.common.unit.TimeValue
类名称:TimeValue
方法名:millisFrac
暂无
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
public double getMillisFrac() {
return millisFrac();
}
代码示例来源:origin: org.elasticsearch/elasticsearch-core
public double getMillisFrac() {
return millisFrac();
}
代码示例来源:origin: harbby/presto-connectors
public double getMillisFrac() {
return millisFrac();
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
suffix = "s";
} else if (nanos >= C2) {
value = millisFrac();
suffix = "ms";
} else if (nanos >= C1) {
代码示例来源:origin: harbby/presto-connectors
suffix = "s";
} else if (nanos >= C2) {
value = millisFrac();
suffix = "ms";
} else if (nanos >= C1) {
代码示例来源:origin: org.elasticsearch/elasticsearch-core
suffix = "s";
} else if (nanos >= C2) {
value = millisFrac();
suffix = "ms";
} else if (nanos >= C1) {
代码示例来源:origin: org.elasticsearch.plugin/reindex-client
static Request scroll(String scroll, TimeValue keepAlive, Version remoteVersion) {
Request request = new Request("POST", "/_search/scroll");
if (remoteVersion.before(Version.V_5_0_0)) {
/* Versions of Elasticsearch before 5.0 couldn't parse nanos or micros
* so we toss out that resolution, rounding up so we shouldn't end up
* with 0s. */
keepAlive = timeValueMillis((long) Math.ceil(keepAlive.millisFrac()));
}
request.addParameter("scroll", keepAlive.getStringRep());
if (remoteVersion.before(Version.fromId(2000099))) {
// Versions before 2.0.0 extract the plain scroll_id from the body
request.setEntity(new NStringEntity(scroll, ContentType.TEXT_PLAIN));
return request;
}
try (XContentBuilder entity = JsonXContent.contentBuilder()) {
entity.startObject()
.field("scroll_id", scroll)
.endObject();
request.setJsonEntity(Strings.toString(entity));
} catch (IOException e) {
throw new ElasticsearchException("failed to build scroll entity", e);
}
return request;
}
代码示例来源:origin: org.elasticsearch.plugin/reindex-client
keepAlive = timeValueMillis((long) Math.ceil(keepAlive.millisFrac()));
内容来源于网络,如有侵权,请联系作者删除!