mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add spi
This commit is contained in:
parent
1b7269187a
commit
3eef8aa6ec
@ -22,7 +22,7 @@ public class DefaultTrustManager extends X509ExtendedTrustManager {
|
||||
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return null;
|
||||
return new X509Certificate[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,6 +72,10 @@ public class TimingWheel {
|
||||
this.wheelSize = wheelSize;
|
||||
this.interval = tickMs * wheelSize;
|
||||
this.timerTaskLists = new TimerTaskList[wheelSize];
|
||||
for (int i = 0; i < wheelSize; i++) {
|
||||
this.timerTaskLists[i] = new TimerTaskList();
|
||||
}
|
||||
|
||||
//currentTime为tickMs的整数倍 这里做取整操作
|
||||
this.currentTime = currentTime - (currentTime % tickMs);
|
||||
this.consumer = consumer;
|
||||
@ -94,11 +98,7 @@ public class TimingWheel {
|
||||
final int index = (int) (virtualId % wheelSize);
|
||||
StaticLog.debug("tickMs: {} ------index: {} ------expiration: {}", tickMs, index, expiration);
|
||||
|
||||
TimerTaskList timerTaskList = timerTaskLists[index];
|
||||
if (null == timerTaskList) {
|
||||
timerTaskList = new TimerTaskList();
|
||||
timerTaskLists[index] = timerTaskList;
|
||||
}
|
||||
final TimerTaskList timerTaskList = timerTaskLists[index];
|
||||
timerTaskList.addTask(timerTask);
|
||||
if (timerTaskList.setExpiration(virtualId * tickMs)) {
|
||||
//添加到delayQueue中
|
||||
|
@ -0,0 +1,4 @@
|
||||
cn.hutool.http.client.engine.httpclient5.HttpClient5Engine
|
||||
cn.hutool.http.client.engine.httpclient4.HttpClient4Engine
|
||||
cn.hutool.http.client.engine.okhttp.OkHttpEngine
|
||||
cn.hutool.http.client.engine.jdk.JdkClientEngine
|
Loading…
x
Reference in New Issue
Block a user