From 853714e5e2fd898cd361274bc6b68b0b2386114a Mon Sep 17 00:00:00 2001 From: lucky 8 <1031900093@qq.com> Date: Sun, 17 Jul 2022 12:03:08 +0800 Subject: [PATCH] Optimized adaptation --- .../adapter/base/ThreadPoolAdapter.java | 7 ----- .../base/ThreadPoolAdapterExtraHandle.java | 29 ------------------- .../adapter/dubbo/DubboThreadPoolAdapter.java | 5 ---- .../hystrix/HystrixThreadPoolAdapter.java | 5 ---- .../adapter/kafka/KafkaThreadPoolAdapter.java | 5 ---- .../rabbitmq/RabbitMQThreadPoolAdapter.java | 5 ---- .../rocketmq/RocketMQThreadPoolAdapter.java | 5 ---- ...ringCloudStreamKafkaThreadPoolAdapter.java | 5 ---- ...gCloudStreamRocketMQThreadPoolAdapter.java | 5 ---- 9 files changed, 71 deletions(-) delete mode 100644 hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterExtraHandle.java diff --git a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapter.java index b6135d29..20b39602 100644 --- a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapter.java @@ -55,11 +55,4 @@ public interface ThreadPoolAdapter { * @return */ boolean updateThreadPool(ThreadPoolAdapterParameter threadPoolAdapterParameter); - - /** - * Additional refresh registration tasks - * - * @return - */ - void extraRefreshRegister(); } diff --git a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterExtraHandle.java b/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterExtraHandle.java deleted file mode 100644 index a6cde2e7..00000000 --- a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterExtraHandle.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package cn.hippo4j.adapter.base; - -import java.util.Map; - -/** - * Thread Pool Adapter Extra Handle - **/ -@FunctionalInterface -public interface ThreadPoolAdapterExtraHandle { - - void execute(Map map); -} diff --git a/hippo4j-adapter/hippo4j-adapter-dubbo/src/main/java/cn/hippo4j/adapter/dubbo/DubboThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-dubbo/src/main/java/cn/hippo4j/adapter/dubbo/DubboThreadPoolAdapter.java index 6da0cdbf..609b3607 100644 --- a/hippo4j-adapter/hippo4j-adapter-dubbo/src/main/java/cn/hippo4j/adapter/dubbo/DubboThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-dubbo/src/main/java/cn/hippo4j/adapter/dubbo/DubboThreadPoolAdapter.java @@ -115,9 +115,4 @@ public class DubboThreadPoolAdapter implements ThreadPoolAdapter, ApplicationLis log.error("Failed to get Dubbo {}.X protocol thread pool", is2xVersion ? "2" : "3", ex); } } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-hystrix/src/main/java/cn/hippo4j/adapter/hystrix/HystrixThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-hystrix/src/main/java/cn/hippo4j/adapter/hystrix/HystrixThreadPoolAdapter.java index 93e434c0..0b28b345 100644 --- a/hippo4j-adapter/hippo4j-adapter-hystrix/src/main/java/cn/hippo4j/adapter/hystrix/HystrixThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-hystrix/src/main/java/cn/hippo4j/adapter/hystrix/HystrixThreadPoolAdapter.java @@ -163,9 +163,4 @@ public class HystrixThreadPoolAdapter implements ThreadPoolAdapter, ApplicationL } } } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-kafka/src/main/java/cn/hippo4j/adapter/kafka/KafkaThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-kafka/src/main/java/cn/hippo4j/adapter/kafka/KafkaThreadPoolAdapter.java index 249decb6..e27ced8a 100644 --- a/hippo4j-adapter/hippo4j-adapter-kafka/src/main/java/cn/hippo4j/adapter/kafka/KafkaThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-kafka/src/main/java/cn/hippo4j/adapter/kafka/KafkaThreadPoolAdapter.java @@ -49,9 +49,4 @@ public class KafkaThreadPoolAdapter implements ThreadPoolAdapter, ApplicationLis public void onApplicationEvent(ApplicationStartedEvent event) { } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-rabbitmq/src/main/java/cn/hippo4j/adapter/rabbitmq/RabbitMQThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-rabbitmq/src/main/java/cn/hippo4j/adapter/rabbitmq/RabbitMQThreadPoolAdapter.java index dd0717cd..6595a0b4 100644 --- a/hippo4j-adapter/hippo4j-adapter-rabbitmq/src/main/java/cn/hippo4j/adapter/rabbitmq/RabbitMQThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-rabbitmq/src/main/java/cn/hippo4j/adapter/rabbitmq/RabbitMQThreadPoolAdapter.java @@ -114,9 +114,4 @@ public class RabbitMQThreadPoolAdapter implements ThreadPoolAdapter, Application } } } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-rocketmq/src/main/java/cn/hippo4j/adapter/rocketmq/RocketMQThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-rocketmq/src/main/java/cn/hippo4j/adapter/rocketmq/RocketMQThreadPoolAdapter.java index c63e8cd3..bb3517f1 100644 --- a/hippo4j-adapter/hippo4j-adapter-rocketmq/src/main/java/cn/hippo4j/adapter/rocketmq/RocketMQThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-rocketmq/src/main/java/cn/hippo4j/adapter/rocketmq/RocketMQThreadPoolAdapter.java @@ -108,9 +108,4 @@ public class RocketMQThreadPoolAdapter implements ThreadPoolAdapter, Application } } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-kafka/src/main/java/cn/hippo4j/adapter/springcloud/stream/kafka/SpringCloudStreamKafkaThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-kafka/src/main/java/cn/hippo4j/adapter/springcloud/stream/kafka/SpringCloudStreamKafkaThreadPoolAdapter.java index ff659f62..4cc49356 100644 --- a/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-kafka/src/main/java/cn/hippo4j/adapter/springcloud/stream/kafka/SpringCloudStreamKafkaThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-kafka/src/main/java/cn/hippo4j/adapter/springcloud/stream/kafka/SpringCloudStreamKafkaThreadPoolAdapter.java @@ -56,9 +56,4 @@ public class SpringCloudStreamKafkaThreadPoolAdapter implements ThreadPoolAdapte public void onApplicationEvent(ApplicationStartedEvent event) { } - - @Override - public void extraRefreshRegister() { - - } } diff --git a/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-rocketmq/src/main/java/cn/hippo4j/adapter/springcloud/stream/rocketmq/SpringCloudStreamRocketMQThreadPoolAdapter.java b/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-rocketmq/src/main/java/cn/hippo4j/adapter/springcloud/stream/rocketmq/SpringCloudStreamRocketMQThreadPoolAdapter.java index 76fc74bd..14dc3db2 100644 --- a/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-rocketmq/src/main/java/cn/hippo4j/adapter/springcloud/stream/rocketmq/SpringCloudStreamRocketMQThreadPoolAdapter.java +++ b/hippo4j-adapter/hippo4j-adapter-spring-cloud-stream-rocketmq/src/main/java/cn/hippo4j/adapter/springcloud/stream/rocketmq/SpringCloudStreamRocketMQThreadPoolAdapter.java @@ -122,9 +122,4 @@ public class SpringCloudStreamRocketMQThreadPoolAdapter implements ThreadPoolAda log.error("Failed to get input-bindings thread pool.", ex); } } - - @Override - public void extraRefreshRegister() { - - } }