move usages of StringCompressor to outside of TagsBuilder
This commit is contained in:
@@ -25,10 +25,9 @@ public class TagsBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public TagsBuilder add(final String key, final String value) {
|
||||
final int keyAsInt = Tags.STRING_COMPRESSOR.getIfPresent(key);
|
||||
final int valueAsInt = Tags.STRING_COMPRESSOR.getIfPresent(value);
|
||||
return add(keyAsInt, valueAsInt);
|
||||
public TagsBuilder add(final Tag tag) {
|
||||
tags.add(tag);
|
||||
return this;
|
||||
}
|
||||
|
||||
public TagsBuilder addAndAddToDictionary(final String key, final String value) {
|
||||
|
||||
@@ -89,13 +89,14 @@ public class MemoryScale {
|
||||
}
|
||||
|
||||
private static Object createTags6() {
|
||||
TagsBuilder result = TagsBuilder.create();
|
||||
result = result.add("k1", "v1");
|
||||
result = result.add("k2", "v2");
|
||||
result = result.add("k3", "v3");
|
||||
result = result.add("k4", "v4");
|
||||
result = result.add("k5", "v5");
|
||||
result = result.add("k6", "v6");
|
||||
final TagsBuilder result = TagsBuilder.create();
|
||||
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k1", "v1"));
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k2", "v2"));
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k3", "v3"));
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k4", "v4"));
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k5", "v5"));
|
||||
result.add(Tags.STRING_COMPRESSOR.createTag("k6", "v6"));
|
||||
return result.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user