MemoryOrderByReducerResultSet.java 1.4 KB
Newer Older
G
gaohongtao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 * Copyright 1999-2015 dangdang.com.
 * <p>
 * Licensed 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.
 * </p>
 */

package com.dangdang.ddframe.rdb.sharding.merger.component.reducer;

G
gaohongtao 已提交
20 21 22
import java.sql.ResultSet;
import java.util.List;

G
gaohongtao 已提交
23
import com.dangdang.ddframe.rdb.sharding.merger.component.ReducerResultSet;
G
gaoht 已提交
24
import com.dangdang.ddframe.rdb.sharding.merger.component.other.MemoryOrderByResultSet;
G
gaohongtao 已提交
25
import com.dangdang.ddframe.rdb.sharding.parser.result.merger.OrderByColumn;
G
gaoht 已提交
26

G
gaohongtao 已提交
27 28 29 30 31
/**
 * 根据排序列进行内存中排序.
 *
 * @author gaohongtao
 */
G
gaohongtao 已提交
32
public class MemoryOrderByReducerResultSet extends MemoryOrderByResultSet implements ReducerResultSet {
G
gaohongtao 已提交
33
    
G
gaohongtao 已提交
34 35 36
    public MemoryOrderByReducerResultSet(final List<OrderByColumn> orderByColumns) {
        super(orderByColumns);
    }
G
gaohongtao 已提交
37 38
    
    @Override
G
gaoht 已提交
39
    public void init(final List<ResultSet> preResultSet) {
G
gaohongtao 已提交
40
        setResultSets(preResultSet);
G
gaohongtao 已提交
41 42
    }
}