当前位置: 首页>>代码示例>>Java>>正文


Java Strings.collectionToDelimitedString方法代码示例

本文整理汇总了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();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:28,代码来源:SearchSlowLog.java

示例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, ",");
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:SettingsFilter.java

示例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, ", ");
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:ShardStateAction.java

示例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));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:PostingsHighlighter.java

示例5: getDescription

import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String getDescription() {
    return "requests[" + requests.size() + "], indices[" + Strings.collectionToDelimitedString(indices, ", ") + "]";
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:BulkRequest.java

示例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));
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:PostingsHighlighter.java

示例7: getPatterns

import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
public String getPatterns() {
    return Strings.collectionToDelimitedString(patterns, ",");
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:4,代码来源:SettingsFilter.java

示例8: toString

import org.elasticsearch.common.Strings; //导入方法依赖的package包/类
@Override
public String toString() {
    return Strings.collectionToDelimitedString(version, ".");
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:JavaVersion.java


注:本文中的org.elasticsearch.common.Strings.collectionToDelimitedString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。