tech.ydb.topic.description.SupportedCodecs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-topic Show documentation
Show all versions of ydb-sdk-topic Show documentation
Topic client implementation
package tech.ydb.topic.description;
import java.util.ArrayList;
import java.util.List;
import com.google.common.collect.ImmutableList;
/**
* @author Nikolay Perfilov
*/
public class SupportedCodecs {
private final List codecs;
public SupportedCodecs(Builder builder) {
this.codecs = ImmutableList.copyOf(builder.codecs);
}
public List getCodecs() {
return codecs;
}
public static Builder newBuilder() {
return new Builder();
}
/**
* BUILDER
*/
public static class Builder {
private List codecs = new ArrayList<>();
public Builder addCodec(Codec codec) {
codecs.add(codec);
return this;
}
public Builder setCodecs(List supportedCodecs) {
this.codecs = supportedCodecs;
return this;
}
public SupportedCodecs build() {
return new SupportedCodecs(this);
}
}
}