本文整理汇总了Java中org.elasticsearch.common.Strings.collectionToDelimitedString方法的典型用法代码示例。如果您正苦于以下问题:Java Strings.collectionToDelimitedString方法的具体用法?Java Strings.collectionToDelimitedString怎么用?Java Strings.collectionToDelimitedString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.Strings
的用法示例。
在下文中一共展示了Strings.collectionToDelimitedString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(context.indexShard().shardId()).append(" ");
sb.append("took[").append(TimeValue.timeValueNanos(tookInNanos)).append("], took_millis[").append(TimeUnit.NANOSECONDS.toMillis(tookInNanos)).append("], ");
if (context.getQueryShardContext().getTypes() == null) {
sb.append("types[], ");
} else {
sb.append("types[");
Strings.arrayToDelimitedString(context.getQueryShardContext().getTypes(), ",", sb);
sb.append("], ");
}
if (context.groupStats() == null) {
sb.append("stats[], ");
} else {
sb.append("stats[");
Strings.collectionToDelimitedString(context.groupStats(), ",", "", "", sb);
sb.append("], ");
}
sb.append("search_type[").append(context.searchType()).append("], total_shards[").append(context.numberOfShards()).append("], ");
if (context.request().source() != null) {
sb.append("source[").append(context.request().source().toString(FORMAT_PARAMS)).append("], ");
} else {
sb.append("source[], ");
}
return sb.toString();
}
示例2: SettingsFilter
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
public SettingsFilter(Settings settings, Collection<String> patterns) {
super(settings);
for (String pattern : patterns) {
if (isValidPattern(pattern) == false) {
throw new IllegalArgumentException("invalid pattern: " + pattern);
}
}
this.patterns = Collections.unmodifiableSet(new HashSet<>(patterns));
patternString = Strings.collectionToDelimitedString(patterns, ",");
}
示例3: toString
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String toString() {
List<String> components = new ArrayList<>(4);
components.add("target shard [" + shardRouting +"]");
components.add("indexUUID [" + indexUUID + "]");
components.add("message [" + message +"]");
components.add("finderNodeId [" + finderNodeId +"]");
if (failure != null) {
components.add("failure [" + ExceptionsHelper.detailedMessage(failure) + "]");
}
return Strings.collectionToDelimitedString(components, ", ");
}
示例4: mergeFieldValues
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
static String mergeFieldValues(List<Object> fieldValues, char valuesSeparator) {
//postings highlighter accepts all values in a single string, as offsets etc. need to match with content
//loaded from stored fields, we merge all values using a proper separator
String rawValue = Strings.collectionToDelimitedString(fieldValues, String.valueOf(valuesSeparator));
return rawValue.substring(0, Math.min(rawValue.length(), Integer.MAX_VALUE - 1));
}
示例5: getDescription
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String getDescription() {
return "requests[" + requests.size() + "], indices[" + Strings.collectionToDelimitedString(indices, ", ") + "]";
}
示例6: mergeFieldValues
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
private static String mergeFieldValues(List<Object> fieldValues, char valuesSeparator) {
//postings highlighter accepts all values in a single string, as offsets etc. need to match with content
//loaded from stored fields, we merge all values using a proper separator
String rawValue = Strings.collectionToDelimitedString(fieldValues, String.valueOf(valuesSeparator));
return rawValue.substring(0, Math.min(rawValue.length(), Integer.MAX_VALUE - 1));
}
示例7: getPatterns
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
public String getPatterns() {
return Strings.collectionToDelimitedString(patterns, ",");
}
示例8: toString
import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String toString() {
return Strings.collectionToDelimitedString(version, ".");
}