Skip to content

Commit

Permalink
Rename ShowPluginsResultRowBuilder to PluginTypeAndClassMapper (#30094)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Feb 11, 2024
1 parent d56a1f0 commit b898ded
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.encrypt.distsql.handler.query;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;

/**
* Show encrypt algorithm plugins result row builder.
* Encrypt algorithm type and class mapper.
*/
public final class ShowEncryptAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class EncryptAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<EncryptAlgorithm> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.mask.distsql.handler.query.ShowMaskAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.encrypt.distsql.handler.query.EncryptAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.mask.distsql.handler.query;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.mask.spi.MaskAlgorithm;

/**
* Show mask algorithm plugins result row builder.
* Mask algorithm type and class mapper.
*/
public final class ShowMaskAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class MaskAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@SuppressWarnings("rawtypes")
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.shadow.distsql.handler.query.ShowShadowAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.mask.distsql.handler.query.MaskAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.readwritesplitting.distsql.handler.query;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.readwritesplitting.spi.ReadQueryLoadBalanceAlgorithm;

/**
* Show read query load balance algorithm plugins result row builder.
* Read query load balance algorithm type and class mapper.
*/
public final class ShowReadQueryLoadBalanceAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class ReadQueryLoadBalanceAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<ReadQueryLoadBalanceAlgorithm> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.readwritesplitting.distsql.handler.query.ShowReadQueryLoadBalanceAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.readwritesplitting.distsql.handler.query.ReadQueryLoadBalanceAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.shadow.distsql.handler.query;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.shadow.spi.ShadowAlgorithm;

/**
* Show shadow algorithm plugins result row builder.
* Show shadow algorithm type and class mapper.
*/
public final class ShowShadowAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class ShadowAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<ShadowAlgorithm> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.encrypt.distsql.handler.query.ShowEncryptAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.shadow.distsql.handler.query.ShadowAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.sharding.distsql.handler.query;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.sharding.spi.ShardingAlgorithm;

/**
* Show sharding algorithm plugins result row builder.
* Show sharding algorithm type and class mapper.
*/
public final class ShowShardingAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class ShardingAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<ShardingAlgorithm> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# 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.
#

org.apache.shardingsphere.sharding.distsql.handler.query.ShardingAlgorithmTypeAndClassMapper

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

/**
* Show plugins result row builder.
* Plugin type and class mapper.
*/
@SingletonSPI
public interface ShowPluginsResultRowBuilder extends TypedSPI {
public interface PluginTypeAndClassMapper extends TypedSPI {

/**
* Get plugin class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private List<String> getColumnNames(final Class<? extends TypedSPI> pluginClass)
private Class<? extends TypedSPI> getPluginClass(final ShowPluginsStatement sqlStatement) {
return sqlStatement.getPluginClass().isPresent()
? getPluginClass(sqlStatement.getPluginClass().get())
: TypedSPILoader.getService(ShowPluginsResultRowBuilder.class, sqlStatement.getType()).getPluginClass();
: TypedSPILoader.getService(PluginTypeAndClassMapper.class, sqlStatement.getType()).getPluginClass();
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

/**
* Show common plugins result row builder.
* Common plugin type and class mapper.
*/
public final class ShowCommonPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class CommonPluginTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<TypedSPI> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type;

import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;
import org.apache.shardingsphere.keygen.core.algorithm.KeyGenerateAlgorithm;

/**
* Show key generate algorithm plugins result row builder.
* Key generate algorithm type and class mapper.
*/
public final class ShowKeyGenerateAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class KeyGenerateAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<KeyGenerateAlgorithm> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type.ShowKeyGenerateAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type.KeyGenerateAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
package org.apache.shardingsphere.data.pipeline.migration.distsql.handler.query;

import org.apache.shardingsphere.data.pipeline.core.consistencycheck.table.TableDataConsistencyChecker;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.ShowPluginsResultRowBuilder;
import org.apache.shardingsphere.distsql.handler.executor.ral.plugin.PluginTypeAndClassMapper;

/**
* Show migration check algorithm plugins result row builder.
* Migration check algorithm type and class mapper.
*/
public final class ShowMigrationCheckAlgorithmPluginsResultRowBuilder implements ShowPluginsResultRowBuilder {
public final class MigrationCheckAlgorithmTypeAndClassMapper implements PluginTypeAndClassMapper {

@Override
public Class<TableDataConsistencyChecker> getPluginClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.data.pipeline.migration.distsql.handler.query.ShowMigrationCheckAlgorithmPluginsResultRowBuilder
org.apache.shardingsphere.data.pipeline.migration.distsql.handler.query.MigrationCheckAlgorithmTypeAndClassMapper
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# limitations under the License.
#

org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type.ShowCommonPluginsResultRowBuilder
org.apache.shardingsphere.distsql.handler.executor.ral.plugin.type.CommonPluginTypeAndClassMapper

0 comments on commit b898ded

Please sign in to comment.