public synchronized void setMaxMergesAndThreads(int maxMergeCount, int maxThreadCount) {if (maxMergeCount == AUTO_DETECT_MERGES_AND_THREADS && maxThreadCount == AUTO_DETECT_MERGES_AND_THREADS) {this.maxMergeCount = AUTO_DETECT_MERGES_AND_THREADS;this.maxThreadCount = AUTO_DETECT_MERGES_AND_THREADS;} else if (maxMergeCount == AUTO_DETECT_MERGES_AND_THREADS) {throw new IllegalArgumentException("both maxMergeCount and maxThreadCount must be AUTO_DETECT_MERGES_AND_THREADS");} else if (maxThreadCount == AUTO_DETECT_MERGES_AND_THREADS) {throw new IllegalArgumentException("both maxMergeCount and maxThreadCount must be AUTO_DETECT_MERGES_AND_THREADS");} else {if (maxThreadCount < 1) {throw new IllegalArgumentException("maxThreadCount should be at least 1");}if (maxMergeCount < 1) {throw new IllegalArgumentException("maxMergeCount should be at least 1");}if (maxThreadCount > maxMergeCount) {throw new IllegalArgumentException("maxThreadCount should be <= maxMergeCount (= " + maxMergeCount + ")");}this.maxThreadCount = maxThreadCount;this.maxMergeCount = maxMergeCount;}}

public virtual void SetMaxMergesAndThreads(int maxMergeCount, int maxThreadCount){if (maxThreadCount < 1){throw new System.ArgumentException("maxThreadCount should be at least 1");}if (maxMergeCount < 1){throw new System.ArgumentException("maxMergeCount should be at least 1");}if (maxThreadCount > maxMergeCount){throw new System.ArgumentException("maxThreadCount should be <= maxMergeCount (= " + maxMergeCount + ")");}this.maxThreadCount = maxThreadCount;this.maxMergeCount = maxMergeCount;}
