|
|
@ -24,7 +24,7 @@ import cn.hippo4j.core.executor.manage.GlobalThreadPoolManage;
|
|
|
|
import cn.hippo4j.core.executor.support.AbstractDynamicExecutorSupport;
|
|
|
|
import cn.hippo4j.core.executor.support.AbstractDynamicExecutorSupport;
|
|
|
|
import cn.hippo4j.core.executor.support.QueueTypeEnum;
|
|
|
|
import cn.hippo4j.core.executor.support.QueueTypeEnum;
|
|
|
|
import cn.hippo4j.core.executor.support.RejectedTypeEnum;
|
|
|
|
import cn.hippo4j.core.executor.support.RejectedTypeEnum;
|
|
|
|
import cn.hippo4j.core.executor.support.ResizableCapacityLinkedBlockIngQueue;
|
|
|
|
import cn.hippo4j.core.executor.support.ResizableCapacityLinkedBlockingQueue;
|
|
|
|
import cn.hippo4j.core.proxy.RejectedProxyUtil;
|
|
|
|
import cn.hippo4j.core.proxy.RejectedProxyUtil;
|
|
|
|
import cn.hippo4j.core.springboot.starter.config.BootstrapCoreProperties;
|
|
|
|
import cn.hippo4j.core.springboot.starter.config.BootstrapCoreProperties;
|
|
|
|
import cn.hippo4j.core.springboot.starter.config.ExecutorProperties;
|
|
|
|
import cn.hippo4j.core.springboot.starter.config.ExecutorProperties;
|
|
|
@ -188,8 +188,8 @@ public class ExecutorsListener implements ApplicationListener<Hippo4jCoreDynamic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!Objects.equals(beforeProperties.getQueueCapacity(), properties.getQueueCapacity())
|
|
|
|
if (!Objects.equals(beforeProperties.getQueueCapacity(), properties.getQueueCapacity())
|
|
|
|
&& Objects.equals(QueueTypeEnum.RESIZABLE_LINKED_BLOCKING_QUEUE.name, executor.getQueue().getClass().getSimpleName())) {
|
|
|
|
&& Objects.equals(QueueTypeEnum.RESIZABLE_LINKED_BLOCKING_QUEUE.name, executor.getQueue().getClass().getSimpleName())) {
|
|
|
|
if (executor.getQueue() instanceof ResizableCapacityLinkedBlockIngQueue) {
|
|
|
|
if (executor.getQueue() instanceof ResizableCapacityLinkedBlockingQueue) {
|
|
|
|
ResizableCapacityLinkedBlockIngQueue<?> queue = (ResizableCapacityLinkedBlockIngQueue<?>) executor.getQueue();
|
|
|
|
ResizableCapacityLinkedBlockingQueue<?> queue = (ResizableCapacityLinkedBlockingQueue<?>) executor.getQueue();
|
|
|
|
queue.setCapacity(properties.getQueueCapacity());
|
|
|
|
queue.setCapacity(properties.getQueueCapacity());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
log.warn("The queue length cannot be modified. Queue type mismatch. Current queue type :: {}", executor.getQueue().getClass().getSimpleName());
|
|
|
|
log.warn("The queue length cannot be modified. Queue type mismatch. Current queue type :: {}", executor.getQueue().getClass().getSimpleName());
|
|
|
|