Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing unused fields from ReaderSettings #337

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions topic/src/main/java/tech/ydb/topic/settings/ReaderSettings.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package tech.ydb.topic.settings;

import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
Expand All @@ -20,19 +18,13 @@ public class ReaderSettings {
private final String readerName;
private final List<TopicReadSettings> topics;
private final long maxMemoryUsageBytes;
private final Duration maxLag;
private final Instant readFrom;
private final boolean decompress;
private final Executor decompressionExecutor;

private ReaderSettings(Builder builder) {
this.consumerName = builder.consumerName;
this.readerName = builder.readerName;
this.topics = ImmutableList.copyOf(builder.topics);
this.maxMemoryUsageBytes = builder.maxMemoryUsageBytes;
this.maxLag = builder.maxLag;
this.readFrom = builder.readFrom;
this.decompress = builder.decompress;
this.decompressionExecutor = builder.decompressionExecutor;
}

Expand All @@ -53,18 +45,6 @@ public long getMaxMemoryUsageBytes() {
return maxMemoryUsageBytes;
}

public Duration getMaxLag() {
return maxLag;
}

public Instant getReadFrom() {
return readFrom;
}

public boolean isDecompress() {
return decompress;
}

public Executor getDecompressionExecutor() {
return decompressionExecutor;
}
Expand All @@ -82,9 +62,6 @@ public static class Builder {
private String readerName = null;
private List<TopicReadSettings> topics = new ArrayList<>();
private long maxMemoryUsageBytes = MAX_MEMORY_USAGE_BYTES_DEFAULT;
private Duration maxLag = null;
private Instant readFrom = null;
private boolean decompress = true;
private Executor decompressionExecutor = null;

public Builder setConsumerName(String consumerName) {
Expand Down Expand Up @@ -126,26 +103,6 @@ public Builder setMaxMemoryUsageBytes(long maxMemoryUsageBytes) {
return this;
}

public Builder setMaxLag(Duration maxLag) {
this.maxLag = maxLag;
return this;
}

public Builder setReadFrom(Instant readFrom) {
this.readFrom = readFrom;
return this;
}

/**
* Set whether messages should be decompressed.
* @param decompress whether messages should be decompressed. true by default
* @return settings builder
*/
public Builder setDecompress(boolean decompress) {
this.decompress = decompress;
return this;
}

/**
* Set executor for decompression tasks.
* If not set, default executor will be used.
Expand Down