调整UUID到新配置的线程数范围和注释说明
This commit is contained in:
@@ -14,8 +14,8 @@ public class UuidToNewProperties
|
||||
/** 每轮抓取订单数(1~1000) */
|
||||
private int batchSize = 200;
|
||||
/**
|
||||
* 批内工作线程数(1~4)。
|
||||
* 默认1;冲刺追数可设2~3(生产4核谨慎)。
|
||||
* 批内工作线程数(1~16)。
|
||||
* 默认1;冲刺可上到与本地重计费相近的16,4核机器需盯CPU/连接池。
|
||||
*/
|
||||
private int threadCount = 1;
|
||||
/** 无待处理订单时空转睡眠毫秒(开关仍为开时) */
|
||||
@@ -56,7 +56,7 @@ public class UuidToNewProperties
|
||||
this.threadCount = threadCount;
|
||||
}
|
||||
|
||||
/** 限定在1~4 */
|
||||
/** 限定在1~16 */
|
||||
public int resolvedThreadCount()
|
||||
{
|
||||
int n = threadCount;
|
||||
@@ -64,9 +64,9 @@ public class UuidToNewProperties
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (n > 4)
|
||||
if (n > 16)
|
||||
{
|
||||
return 4;
|
||||
return 16;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
+2
-2
@@ -97,9 +97,9 @@ public class UuidToNewMonitorServiceImpl implements IUuidToNewMonitorService
|
||||
{
|
||||
n = 1;
|
||||
}
|
||||
if (n > 4)
|
||||
if (n > 16)
|
||||
{
|
||||
n = 4;
|
||||
n = 16;
|
||||
}
|
||||
properties.setThreadCount(n);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user