diff --git a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java index 110ff5ac616a8..1cc4536058ffd 100644 --- a/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java +++ b/kernel/data-pipeline/scenario/migration/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/migration/preparer/MigrationJobPreparer.java @@ -70,7 +70,7 @@ import org.apache.shardingsphere.infra.lock.LockDefinition; import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData; import org.apache.shardingsphere.infra.parser.SQLParserEngine; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.parser.rule.SQLParserRule; diff --git a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/executor/GlobalClockTransactionHook.java b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/executor/GlobalClockTransactionHook.java index 87a0ba3f06752..8d5e9c7b93aee 100644 --- a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/executor/GlobalClockTransactionHook.java +++ b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/executor/GlobalClockTransactionHook.java @@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.lock.LockContext; import org.apache.shardingsphere.infra.lock.LockDefinition; import org.apache.shardingsphere.infra.session.connection.transaction.TransactionConnectionContext; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.sql.parser.statement.core.enums.TransactionIsolationLevel; import org.apache.shardingsphere.transaction.spi.TransactionHook; diff --git a/kernel/schedule/core/src/main/java/org/apache/shardingsphere/schedule/core/job/statistics/collect/StatisticsCollectJob.java b/kernel/schedule/core/src/main/java/org/apache/shardingsphere/schedule/core/job/statistics/collect/StatisticsCollectJob.java index df146a3d67dc7..d24a581797ff6 100644 --- a/kernel/schedule/core/src/main/java/org/apache/shardingsphere/schedule/core/job/statistics/collect/StatisticsCollectJob.java +++ b/kernel/schedule/core/src/main/java/org/apache/shardingsphere/schedule/core/job/statistics/collect/StatisticsCollectJob.java @@ -20,7 +20,7 @@ import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.elasticjob.api.ShardingContext; import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.cluster.persist.service.GlobalLockPersistService; import org.apache.shardingsphere.mode.metadata.refresher.ShardingSphereStatisticsRefreshEngine; diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockContext.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContext.java similarity index 92% rename from mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockContext.java rename to mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContext.java index 59d07d24d6d56..266a1a704048b 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockContext.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContext.java @@ -15,10 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.lock; +package org.apache.shardingsphere.mode.lock.global; import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.infra.lock.LockContext; +import org.apache.shardingsphere.mode.lock.LockPersistService; /** * Global lock context. diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinition.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinition.java similarity index 95% rename from mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinition.java rename to mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinition.java index 7edf9a883222e..43cc3a02154f8 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinition.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinition.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.lock; +package org.apache.shardingsphere.mode.lock.global; import lombok.Getter; import org.apache.shardingsphere.infra.lock.LockDefinition; diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngine.java b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngine.java index df64f20982df9..9730c6bd5ffc8 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngine.java +++ b/mode/core/src/main/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngine.java @@ -34,8 +34,8 @@ import org.apache.shardingsphere.infra.metadata.statistics.collector.ShardingSphereStatisticsCollector; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.infra.yaml.data.swapper.YamlShardingSphereRowDataSwapper; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.metadata.persist.data.AlteredShardingSphereDatabaseData; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockContextTest.java b/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContextTest.java similarity index 94% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockContextTest.java rename to mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContextTest.java index e89c8e2233d53..b281c8e4e0da3 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockContextTest.java +++ b/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockContextTest.java @@ -15,8 +15,9 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.lock; +package org.apache.shardingsphere.mode.lock.global; +import org.apache.shardingsphere.mode.lock.LockPersistService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinitionTest.java b/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinitionTest.java similarity index 95% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinitionTest.java rename to mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinitionTest.java index 2a27eb5f8077d..8f28aeafd0667 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/GlobalLockDefinitionTest.java +++ b/mode/core/src/test/java/org/apache/shardingsphere/mode/lock/global/GlobalLockDefinitionTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.lock; +package org.apache.shardingsphere.mode.lock.global; import org.junit.jupiter.api.Test; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngineTest.java b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngineTest.java index 5070cbeb49ce2..eb3d204419c89 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngineTest.java +++ b/mode/core/src/test/java/org/apache/shardingsphere/mode/metadata/refresher/ShardingSphereStatisticsRefreshEngineTest.java @@ -29,7 +29,7 @@ import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereSchemaData; import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereStatistics; import org.apache.shardingsphere.infra.metadata.statistics.ShardingSphereTableData; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.test.util.PropertiesBuilder; import org.apache.shardingsphere.test.util.PropertiesBuilder.Property; 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 c34ae5186ae7e..b64d4b56d2420 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 @@ -29,7 +29,7 @@ import org.apache.shardingsphere.infra.util.eventbus.EventSubscriber; import org.apache.shardingsphere.metadata.persist.MetaDataPersistService; import org.apache.shardingsphere.mode.event.deliver.DeliverEventSubscriber; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.ContextManagerBuilder; import org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter; diff --git a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/ListenerAssistedSubscriber.java b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/ListenerAssistedSubscriber.java index c2d5b80768fd5..f97d84c338316 100644 --- a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/ListenerAssistedSubscriber.java +++ b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/ListenerAssistedSubscriber.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.metadata.persist.node.DatabaseMetaDataNode; import org.apache.shardingsphere.mode.event.dispatch.assisted.CreateDatabaseListenerAssistedEvent; import org.apache.shardingsphere.mode.event.dispatch.assisted.DropDatabaseListenerAssistedEvent; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.DatabaseMetaDataChangedListener; import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.DispatchEventSubscriber; diff --git a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/MetaDataChangedSubscriber.java b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/MetaDataChangedSubscriber.java index 7ed94f407b9f7..a688874202a53 100644 --- a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/MetaDataChangedSubscriber.java +++ b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/subscriber/type/MetaDataChangedSubscriber.java @@ -28,7 +28,7 @@ import org.apache.shardingsphere.mode.event.dispatch.metadata.schema.table.TableDroppedEvent; import org.apache.shardingsphere.mode.event.dispatch.metadata.schema.view.ViewCreatedOrAlteredEvent; import org.apache.shardingsphere.mode.event.dispatch.metadata.schema.view.ViewDroppedEvent; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.subscriber.DispatchEventSubscriber; import org.apache.shardingsphere.mode.manager.cluster.persist.service.GlobalLockPersistService; diff --git a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistService.java b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistService.java index 2c6e43d96f2e0..f20366e5e52a5 100644 --- a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistService.java +++ b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistService.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.mode.manager.cluster.persist.service; import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.lock.LockPersistService; import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository; diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistServiceTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistServiceTest.java index cf68d00d9fdc1..690d86303cc7f 100644 --- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistServiceTest.java +++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/persist/service/GlobalLockPersistServiceTest.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.mode.manager.cluster.persist.service; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilder.java b/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilder.java index 627e268103922..335256ca580d2 100644 --- a/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilder.java +++ b/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilder.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.infra.util.eventbus.EventBusContext; import org.apache.shardingsphere.metadata.persist.MetaDataPersistService; -import org.apache.shardingsphere.mode.lock.GlobalLockContext; +import org.apache.shardingsphere.mode.lock.global.GlobalLockContext; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.ContextManagerBuilder; import org.apache.shardingsphere.mode.manager.ContextManagerBuilderParameter; diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java index 706e925c19a7f..52e4f65591daf 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/LockClusterExecutor.java @@ -28,7 +28,7 @@ import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; import org.apache.shardingsphere.infra.state.cluster.ClusterState; import org.apache.shardingsphere.mode.exception.LockedClusterException; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.proxy.backend.lock.spi.ClusterLockStrategy; diff --git a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java index fb5dab9870ae0..ff314edf85c1b 100644 --- a/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java +++ b/proxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/ral/updatable/UnlockClusterExecutor.java @@ -25,7 +25,7 @@ import org.apache.shardingsphere.infra.lock.LockContext; import org.apache.shardingsphere.infra.state.cluster.ClusterState; import org.apache.shardingsphere.mode.exception.NotLockedClusterException; -import org.apache.shardingsphere.mode.lock.GlobalLockDefinition; +import org.apache.shardingsphere.mode.lock.global.GlobalLockDefinition; import org.apache.shardingsphere.mode.manager.ContextManager; /**