diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-04-29 09:35:44 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-04-29 09:35:44 +0200 |
commit | 2a7e2027f1e3cd4643b35bbac412f65f305d994c (patch) | |
tree | f15d99b87a1686b385d3006d96d32b50835add0c /vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java | |
parent | ed25d1bffcfe410e4806402db41fa9b9654c61ca (diff) |
GC unused config
Diffstat (limited to 'vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java')
-rwxr-xr-x | vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java b/vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java index ecfd3c9eded..25ef7651e28 100755 --- a/vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java +++ b/vespaclient-core/src/main/java/com/yahoo/feedapi/FeederOptions.java @@ -22,14 +22,12 @@ public class FeederOptions { private boolean abortOnSendError = true; private boolean retryEnabled = true; private double timeout = 60; - private int maxPendingBytes = 0; private int maxPendingDocs = 0; private double maxFeedRate = 0.0; private String route = "default"; private int traceLevel; private int mbusPort; private DocumentProtocol.Priority priority = DocumentProtocol.Priority.NORMAL_3; - private String docprocChain = ""; /** Constructs an options object with all default values. */ FeederOptions() { @@ -40,14 +38,12 @@ public class FeederOptions { FeederOptions(FeederConfig config) { setAbortOnDocumentError(config.abortondocumenterror()); setAbortOnSendError(config.abortonsenderror()); - setMaxPendingBytes(config.maxpendingbytes()); setMaxPendingDocs(config.maxpendingdocs()); setRetryEnabled(config.retryenabled()); setRoute(config.route()); setTimeout(config.timeout()); setTraceLevel(config.tracelevel()); setMessageBusPort(config.mbusport()); - setDocprocChain(config.docprocchain()); setMaxFeedRate(config.maxfeedrate()); } @@ -71,10 +67,6 @@ public class FeederOptions { this.timeout = timeout; } - private void setMaxPendingBytes(int maxPendingBytes) { - this.maxPendingBytes = maxPendingBytes; - } - private void setMaxPendingDocs(int maxPendingDocs) { this.maxPendingDocs = maxPendingDocs; } @@ -123,14 +115,6 @@ public class FeederOptions { this.priority = priority; } - String getDocprocChain() { - return docprocChain; - } - - private void setDocprocChain(String chain) { - docprocChain = chain; - } - /** * Creates a source session params object with parameters set as these options * dictate. @@ -141,7 +125,7 @@ public class FeederOptions { StaticThrottlePolicy policy; if (maxFeedRate > 0.0) { policy = new RateThrottlingPolicy(maxFeedRate); - } else if ((maxPendingDocs == 0) && (maxPendingBytes == 0)) { + } else if (maxPendingDocs == 0) { policy = new DynamicThrottlePolicy(); } else { policy = new StaticThrottlePolicy(); @@ -149,9 +133,6 @@ public class FeederOptions { if (maxPendingDocs > 0) { policy.setMaxPendingCount(maxPendingDocs); } - if (maxPendingBytes > 0) { - policy.setMaxPendingSize(maxPendingBytes); - } params.setThrottlePolicy(policy); @@ -179,13 +160,11 @@ public class FeederOptions { ", abortOnSendError=" + abortOnSendError + ", retryEnabled=" + retryEnabled + ", timeout=" + timeout + - ", maxPendingBytes=" + maxPendingBytes + ", maxPendingDocs=" + maxPendingDocs + ", route='" + route + '\'' + ", traceLevel=" + traceLevel + ", mbusPort=" + mbusPort + ", priority=" + priority.name() + - ", docprocChain='" + docprocChain + '\'' + '}'; } @@ -198,14 +177,12 @@ public class FeederOptions { if (abortOnDocumentError != that.abortOnDocumentError) return false; if (abortOnSendError != that.abortOnSendError) return false; - if (maxPendingBytes != that.maxPendingBytes) return false; if (maxPendingDocs != that.maxPendingDocs) return false; if (maxFeedRate != that.maxFeedRate) return false; if (mbusPort != that.mbusPort) return false; if (retryEnabled != that.retryEnabled) return false; if (Double.compare(that.timeout, timeout) != 0) return false; if (traceLevel != that.traceLevel) return false; - if (docprocChain != null ? !docprocChain.equals(that.docprocChain) : that.docprocChain != null) return false; if (priority != that.priority) return false; if (route != null ? !route.equals(that.route) : that.route != null) return false; @@ -221,14 +198,12 @@ public class FeederOptions { result = 31 * result + (retryEnabled ? 1 : 0); temp = timeout != +0.0d ? Double.doubleToLongBits(timeout) : 0L; result = 31 * result + (int) (temp ^ (temp >>> 32)); - result = 31 * result + maxPendingBytes; result = 31 * result + maxPendingDocs; result = 31 * result + ((int)(maxFeedRate * 1000)); result = 31 * result + (route != null ? route.hashCode() : 0); result = 31 * result + traceLevel; result = 31 * result + mbusPort; result = 31 * result + (priority != null ? priority.hashCode() : 0); - result = 31 * result + (docprocChain != null ? docprocChain.hashCode() : 0); return result; } } |