This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 5f2e62ba083 Move useless DispatchEventSubscriber (#34232)
5f2e62ba083 is described below
commit 5f2e62ba0831ef8f5d3a5671d2d0650ca4a8b6d2
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Jan 3 01:00:04 2025 +0800
Move useless DispatchEventSubscriber (#34232)
---
.../cluster/ClusterContextManagerBuilder.java | 2 --
.../ClusterDispatchEventSubscriberRegistry.java | 37 ----------------------
.../subscriber/DispatchEventSubscriber.java | 26 ---------------
3 files changed, 65 deletions(-)
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
index b614155a1f6..d324bf7602b 100644
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
+++
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/ClusterContextManagerBuilder.java
@@ -34,7 +34,6 @@ import
org.apache.shardingsphere.mode.manager.ContextManagerBuilder;
import org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter;
import
org.apache.shardingsphere.mode.manager.cluster.event.ClusterEventSubscriberRegistry;
import
org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.DataChangedEventListenerRegistry;
-import
org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.ClusterDispatchEventSubscriberRegistry;
import
org.apache.shardingsphere.mode.manager.cluster.exception.MissingRequiredClusterRepositoryConfigurationException;
import org.apache.shardingsphere.mode.manager.cluster.lock.ClusterLockContext;
import
org.apache.shardingsphere.mode.manager.cluster.persist.service.GlobalLockPersistService;
@@ -83,7 +82,6 @@ public final class ClusterContextManagerBuilder implements
ContextManagerBuilder
new DataChangedEventListenerRegistry(contextManager,
getDatabaseNames(param,
contextManager.getPersistServiceFacade().getMetaDataPersistService())).register();
ClusterEventSubscriberRegistry eventSubscriberRegistry = new
ClusterEventSubscriberRegistry(contextManager.getComputeNodeInstanceContext().getEventBusContext());
eventSubscriberRegistry.register(createDeliverEventSubscribers(repository));
- eventSubscriberRegistry.register(new
ClusterDispatchEventSubscriberRegistry().getSubscribers());
}
private Collection<String> getDatabaseNames(final
ContextManagerBuilderParameter param, final MetaDataPersistService
metaDataPersistService) {
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/ClusterDispatchEventSubscriberRegistry.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/ClusterDispatchEventSubscriberRegistry.java
deleted file mode 100644
index c2ece87f6c1..00000000000
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/ClusterDispatchEventSubscriberRegistry.java
+++ /dev/null
@@ -1,37 +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
org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber;
-
-import lombok.Getter;
-import org.apache.shardingsphere.infra.util.eventbus.EventSubscriber;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * Cluster dispatch event subscriber registry.
- */
-@Getter
-public final class ClusterDispatchEventSubscriberRegistry {
-
- private final Collection<EventSubscriber> subscribers;
-
- public ClusterDispatchEventSubscriberRegistry() {
- subscribers = Collections.emptyList();
- }
-}
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/DispatchEventSubscriber.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/DispatchEventSubscriber.java
deleted file mode 100644
index 2a915c5093d..00000000000
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/DispatchEventSubscriber.java
+++ /dev/null
@@ -1,26 +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
org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber;
-
-import org.apache.shardingsphere.infra.util.eventbus.EventSubscriber;
-
-/**
- * Dispatch event subscriber.
- */
-public interface DispatchEventSubscriber extends EventSubscriber {
-}