Interface ReadQueryLoadBalanceAlgorithm

  • All Superinterfaces:
    org.apache.shardingsphere.infra.util.spi.type.typed.algorithm.ShardingSphereAlgorithm, org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPI

    public interface ReadQueryLoadBalanceAlgorithm
    extends org.apache.shardingsphere.infra.util.spi.type.typed.algorithm.ShardingSphereAlgorithm
    Read query load-balance algorithm.
    • Method Detail

      • getDataSource

        String getDataSource​(String name,
                             String writeDataSourceName,
                             List<String> readDataSourceNames)
        Get data source.
        Parameters:
        name - read query logic data source name
        writeDataSourceName - name of write data source
        readDataSourceNames - names of read data sources
        Returns:
        name of selected data source