!21 chore: fix the typo to (Seacher to Searcher)

Merge pull request !21 from 酒饮三酌/master
This commit is contained in:
狮子的魂 2025-12-04 02:54:43 +00:00 committed by Gitee
commit e64864aa40
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 17 additions and 17 deletions

View File

@ -17,14 +17,14 @@
// 1, 创建 v4 的配置:指定缓存策略和 v4 的 xdb 文件路径
final Config v4Config = Config.custom()
.setCachePolicy(Config.VIndexCache) // 指定缓存策略: NoCache / VIndexCache / BufferCache
.setSeachers(15) // 设置初始化的查询器数量
.setSearchers(15) // 设置初始化的查询器数量
.setXdbPath("ip2region v4 xdb path") // 设置 v4 xdb 文件的路径
.asV4(); // 指定为 v4 配置
// 2, 创建 v6 的配置:指定缓存策略和 v6 的 xdb 文件路径
final Config v6Config = Config.custom()
.setCachePolicy(Config.VIndexCache) // 指定缓存策略: NoCache / VIndexCache / BufferCache
.setSeachers(15) // 设置初始化的查询器数量
.setSearchers(15) // 设置初始化的查询器数量
.setXdbPath("ip2region v6 xdb path") // 设置 v6 xdb 文件的路径
.asV6(); // 指定为 v6 配置

View File

@ -45,7 +45,7 @@ public class ConfigBuilder {
return this;
}
public ConfigBuilder setSeachers(int searchers) {
public ConfigBuilder setSearchers(int searchers) {
this.searchers = searchers;
return this;
}

View File

@ -25,7 +25,7 @@ public class ConfigTest {
final Config v4Config = Config.custom()
.setCachePolicy(Config.BufferCache)
.setXdbPath(getDataPath("ip2region_v4.xdb"))
.setSeachers(20)
.setSearchers(20)
.asV4();
log.debugf("builded config: %s", v4Config);
}
@ -35,7 +35,7 @@ public class ConfigTest {
final Config v4Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setXdbPath(getDataPath("ip2region_v6.xdb"))
.setSeachers(20)
.setSearchers(20)
.asV6();
log.debugf("builded config: %s", v4Config);
}

View File

@ -19,13 +19,13 @@ public class Ip2RegionTest {
public void TestConfigCreate() throws IOException, XdbException, InetAddressException, InterruptedException {
final Config v4Config = Config.custom()
.setCachePolicy(Config.NoCache)
.setSeachers(10)
.setSearchers(10)
.setXdbPath(ConfigTest.getDataPath("ip2region_v4.xdb"))
.asV4();
final Config v6Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setSeachers(10)
.setSearchers(10)
.setXdbPath(ConfigTest.getDataPath("ip2region_v6.xdb"))
.asV6();
@ -92,13 +92,13 @@ public class Ip2RegionTest {
public void TestConcurrentCall() throws IOException, XdbException, InetAddressException, InterruptedException {
final Config v4Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setSeachers(15)
.setSearchers(15)
.setXdbPath(ConfigTest.getDataPath("ip2region_v4.xdb"))
.asV4();
final Config v6Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setSeachers(15)
.setSearchers(15)
.setXdbPath(ConfigTest.getDataPath("ip2region_v6.xdb"))
.asV6();

View File

@ -9,10 +9,10 @@ public class SearcherPoolTest {
private static final Log log = Log.getLogger(SearcherPoolTest.class).setLevel(Log.DEBUG);
@Test
public void testV4SeacherPool() throws Exception {
public void testV4SearcherPool() throws Exception {
final Config v4Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setSeachers(5)
.setSearchers(5)
.setXdbPath(ConfigTest.getDataPath("ip2region_v4.xdb"))
.asV4();
@ -33,10 +33,10 @@ public class SearcherPoolTest {
}
@Test
public void testV6SeacherPool() throws Exception {
public void testV6SearcherPool() throws Exception {
final Config v6Config = Config.custom()
.setCachePolicy(Config.VIndexCache)
.setSeachers(5)
.setSearchers(5)
.setXdbPath(ConfigTest.getDataPath("ip2region_v6.xdb"))
.asV6();