@@ -0,0 +1,1658 @@
+/*%0A * Copyright 2016-2018 shardingsphere.io.%0A * %3Cp%3E%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * %3C/p%3E%0A */%0A%0Apackage io.shardingsphere.core.routing;%0A%0Aimport lombok.AccessLevel;%0Aimport lombok.EqualsAndHashCode;%0Aimport lombok.Getter;%0Aimport lombok.ToString;%0A%0Aimport java.util.LinkedHashMap;%0Aimport java.util.Map;%0A%0A/**%0A * Batch route unit.%0A * %0A * @author gaohongtao%0A * @author maxiaoguang%0A */%0A@Getter%0A@EqualsAndHashCode%0A@ToString%0Apublic final class BatchRouteUnit extends RouteUnit %7B%0A    %0A    private final Map%3CInteger, Integer%3E jdbcAndActualAddBatchCallTimesMap = new LinkedHashMap%3C%3E();%0A    %0A    @Getter(AccessLevel.NONE)%0A    private int actualCallAddBatchTimes;%0A    %0A    public BatchRouteUnit(final String dataSourceName, final SQLUnit sqlUnit) %7B%0A        super(dataSourceName, sqlUnit);%0A    %7D%0A    %0A    /**%0A     * Map times of use JDBC API call addBatch and times of actual call addBatch after route.%0A     *%0A     * @param jdbcAddBatchTimes times of use JDBC API call addBatch%0A     */%0A    public void mapAddBatchCount(final int jdbcAddBatchTimes) %7B%0A        jdbcAndActualAddBatchCallTimesMap.put(jdbcAddBatchTimes, actualCallAddBatchTimes++);%0A    %7D%0A%7D%0A

add BatchRouteUnit.java