Unverified Commit afda8884 authored by chenqy's avatar chenqy Committed by GitHub
Browse files

Merge pull request #17 from sharding-sphere/dev

update from origin
parents 7160a4b5 788d3c3f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
        <hikari-cp.version>2.4.11</hikari-cp.version>
        <junit.version>4.12</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <dbunit.version>2.5.3</dbunit.version>
        <mockito.version>2.7.21</mockito.version>
        <grpc.version>1.7.0</grpc.version>
        <protobuf.version>3.4.0</protobuf.version>
@@ -193,12 +192,6 @@
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.dbunit</groupId>
                <artifactId>dbunit</artifactId>
                <version>${dbunit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
+0 −4
Original line number Diff line number Diff line
@@ -47,10 +47,6 @@
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
+3 −8
Original line number Diff line number Diff line
@@ -15,19 +15,14 @@
 * </p>
 */

package io.shardingsphere.proxy.backend.common;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
package io.shardingsphere.core.constant;

/**
 * Proxy Mode.
 * Connection Mode.
 *
 * @author zhangyonglun
 */
@RequiredArgsConstructor
@Getter
public enum ProxyMode {
public enum ConnectionMode {
    
    MEMORY_STRICTLY, CONNECTION_STRICTLY
}
+10 −14
Original line number Diff line number Diff line
@@ -54,33 +54,29 @@ public enum ShardingPropertiesConstant {
    EXECUTOR_SIZE("executor.size", String.valueOf(Runtime.getRuntime().availableProcessors()), int.class),
    
    /**
     * Proxy mode.
     * Connection mode of connected to databases.
     *
     * <p>
     * MEMORY_STRICTLY:
     * Proxy holds as many connections as the count of actual tables routed in a database.
     * Sharding-Sphere holds as many connections as the count of actual tables routed in a database.
     * The benefit of this approach is saving memory for Proxy by Stream ResultSet.
     * </p>
     * 
     * <p>
     * CONNECTION_STRICTLY:
     * Proxy will release connections after get the overall rows from the ResultSet.
     * harding-Sphere will release connections after get the overall rows from the ResultSet.
     * Meanwhile, the cost of the memory will be increased.
     * </p>
     */
    PROXY_MODE("proxy.mode", "MEMORY_STRICTLY", String.class),
    
    PROXY_TRANSACTION_MODE("proxy.transaction.mode", "NONE", String.class),
    CONNECTION_MODE("connection.mode", ConnectionMode.MEMORY_STRICTLY.name(), String.class),
    
    /**
     * Thread pool size of connect database for Sharding-Proxy.
     *
     * <p>Cannot change dynamically, change this value should restart proxy.</p>
     */
    PROXY_MAX_WORKING_THREADS("proxy.max.working.threads", Runtime.getRuntime().availableProcessors() * 2 + "", int.class),
    PROXY_TRANSACTION_MODE("proxy.transaction.mode", TransactionType.NONE.name(), String.class),
    
    PROXY_BACKEND_USE_NIO("proxy.backend.use.nio", Boolean.FALSE.toString(), boolean.class),
    
    PROXY_BACKEND_SIMPLE_DB_CONNECTIONS("proxy.backend.simple.db.connections", 8 + "", int.class),
    PROXY_BACKEND_MAX_CONNECTIONS("proxy.backend.max.connections", 8 + "", int.class),
    
    PROXY_BACKEND_CONNECTION_TIMEOUT("proxy.backend.connection.timeout", 60 + "", int.class);
    PROXY_BACKEND_CONNECTION_TIMEOUT_SECONDS("proxy.backend.connection.timeout.seconds", 60 + "", int.class);
    
    private final String key;
    
+1 −5
Original line number Diff line number Diff line
@@ -24,9 +24,5 @@ package io.shardingsphere.core.constant;
 */
public enum TCLType {
    
    SET,
    BEGIN,
    COMMIT,
    ROLLBACK,
    SAVEPOINT
    SET, BEGIN, COMMIT, ROLLBACK, SAVEPOINT
}
Loading