@Test(expected = IllegalArgumentException.class) public void testRebuildParallelismNegative() { SuggesterConfig sconfig = new SuggesterConfig(); sconfig.setRebuildThreadPoolSizeInNcpuPercent(-1); }
public void setRebuildThreadPoolSizeInNcpuPercent(final int percent) { if (percent < 0 || percent > 100) { throw new IllegalArgumentException("Need percentage value"); } this.rebuildThreadPoolSizeInNcpuPercent = percent; }
SuggesterConfig { public void setRebuildThreadPoolSizeInNcpuPercent(final int percent) { if (percent < 0 || percent > 100) { throw new IllegalArgumentException("Need percentage value"); } this.rebuildThreadPoolSizeInNcpuPercent = percent; } }
SuggesterConfig { public void setRebuildThreadPoolSizeInNcpuPercent(final int percent) { if (percent < 0 || percent > 100) { throw new IllegalArgumentException("Need percentage value"); } this.rebuildThreadPoolSizeInNcpuPercent = percent; } SuggesterConfig(); }
SuggesterConfig { public void setRebuildThreadPoolSizeInNcpuPercent(final int percent) { if (percent < 0 || percent > 100) { throw new IllegalArgumentException("Need percentage value"); } this.rebuildThreadPoolSizeInNcpuPercent = percent; } SuggesterConfig(); boolean isEnabled(); void setEnabled(final boolean enabled); int getMaxResults(); void setMaxResults(final int maxResults); int getMinChars(); void setMinChars(final int minChars); Set<String> getAllowedProjects(); void setAllowedProjects(final Set<String> allowedProjects); int getMaxProjects(); void setMaxProjects(final int maxProjects); Set<String> getAllowedFields(); void setAllowedFields(final Set<String> allowedFields); boolean isAllowComplexQueries(); void setAllowComplexQueries(final boolean allowComplexQueries); boolean isAllowMostPopular(); void setAllowMostPopular(final boolean allowMostPopular); boolean isShowScores(); void setShowScores(final boolean showScores); boolean isShowProjects(); void setShowProjects(final boolean showProjects); boolean isShowTime(); void setShowTime(final boolean showTime); String getRebuildCronConfig(); void setRebuildCronConfig(final String rebuildCronConfig); int getBuildTerminationTime(); void setBuildTerminationTime(final int buildTerminationTime); int getTimeThreshold(); void setTimeThreshold(final int timeThreshold); void setRebuildThreadPoolSizeInNcpuPercent(final int percent); int getRebuildThreadPoolSizeInNcpuPercent(); @Override boolean equals(Object o); @Override int hashCode(); }
SuggesterConfig { public void setRebuildThreadPoolSizeInNcpuPercent(final int percent) { if (percent < 0 || percent > 100) { throw new IllegalArgumentException("Need percentage value"); } this.rebuildThreadPoolSizeInNcpuPercent = percent; } SuggesterConfig(); boolean isEnabled(); void setEnabled(final boolean enabled); int getMaxResults(); void setMaxResults(final int maxResults); int getMinChars(); void setMinChars(final int minChars); Set<String> getAllowedProjects(); void setAllowedProjects(final Set<String> allowedProjects); int getMaxProjects(); void setMaxProjects(final int maxProjects); Set<String> getAllowedFields(); void setAllowedFields(final Set<String> allowedFields); boolean isAllowComplexQueries(); void setAllowComplexQueries(final boolean allowComplexQueries); boolean isAllowMostPopular(); void setAllowMostPopular(final boolean allowMostPopular); boolean isShowScores(); void setShowScores(final boolean showScores); boolean isShowProjects(); void setShowProjects(final boolean showProjects); boolean isShowTime(); void setShowTime(final boolean showTime); String getRebuildCronConfig(); void setRebuildCronConfig(final String rebuildCronConfig); int getBuildTerminationTime(); void setBuildTerminationTime(final int buildTerminationTime); int getTimeThreshold(); void setTimeThreshold(final int timeThreshold); void setRebuildThreadPoolSizeInNcpuPercent(final int percent); int getRebuildThreadPoolSizeInNcpuPercent(); @Override boolean equals(Object o); @Override int hashCode(); static final boolean ENABLED_DEFAULT; static final int MAX_RESULTS_DEFAULT; static final int MIN_CHARS_DEFAULT; static final int MAX_PROJECTS_DEFAULT; static final boolean ALLOW_COMPLEX_QUERIES_DEFAULT; static final boolean ALLOW_MOST_POPULAR_DEFAULT; static final boolean SHOW_SCORES_DEFAULT; static final boolean SHOW_PROJECTS_DEFAULT; static final boolean SHOW_TIME_DEFAULT; static final String REBUILD_CRON_CONFIG_DEFAULT; static final int BUILD_TERMINATION_TIME_DEFAULT; static final int TIME_THRESHOLD_DEFAULT; static final int REBUILD_THREAD_POOL_PERCENT_NCPUS_DEFAULT; static final Set<String> allowedProjectsDefault; static final Set<String> allowedFieldsDefault; }