本文整理匯總了Java中org.elasticsearch.common.Strings.arrayToDelimitedString方法的典型用法代碼示例。如果您正苦於以下問題:Java Strings.arrayToDelimitedString方法的具體用法?Java Strings.arrayToDelimitedString怎麽用?Java Strings.arrayToDelimitedString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.elasticsearch.common.Strings
的用法示例。
在下文中一共展示了Strings.arrayToDelimitedString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTask
import org.elasticsearch.common.Strings; //導入方法依賴的package包/類
@Override
public Task createTask(long id, String type, String action, TaskId parentTaskId) {
// generating description in a lazy way since source can be quite big
return new SearchTask(id, type, action, null, parentTaskId) {
@Override
public String getDescription() {
StringBuilder sb = new StringBuilder();
sb.append("indices[");
Strings.arrayToDelimitedString(indices, ",", sb);
sb.append("], ");
sb.append("types[");
Strings.arrayToDelimitedString(types, ",", sb);
sb.append("], ");
sb.append("search_type[").append(searchType).append("], ");
if (source != null) {
sb.append("source[").append(source.toString(FORMAT_PARAMS)).append("]");
} else {
sb.append("source[]");
}
return sb.toString();
}
};
}
示例2: getDescription
import org.elasticsearch.common.Strings; //導入方法依賴的package包/類
public String getDescription() {
StringBuilder sb = new StringBuilder();
sb.append("id[");
sb.append(id);
sb.append("], ");
sb.append("indices[");
Strings.arrayToDelimitedString(originalIndices.indices(), ",", sb);
sb.append("]");
return sb.toString();
}
示例3: 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();
}
示例4: toString
import org.elasticsearch.common.Strings; //導入方法依賴的package包/類
@Override
public String toString() {
return Strings.arrayToDelimitedString(pathElements.toArray(), AGG_DELIM);
}