All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alexkasko.springjdbc.parallel.accessor.RoundRobinNpjtAccessor Maven / Gradle / Ivy

Go to download

Processes given SQL query in parallel in multiple data sources (assuming that all data source contain the same data). Combined results from multiple queries are exposed to application as java.util.Iterator. Worker thread use spring's JdbcTemplate with named parameters support.

There is a newer version: 1.2.3
Show newest version
package com.alexkasko.springjdbc.parallel.accessor;

import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;

import java.util.Collection;

import static java.util.Arrays.asList;

/**
 * {@link RoundRobinAccessor} subclass for {@code NamedParameterJdbcTemplate}.
 *
 * @author alexkasko
 * Date: 1/21/13
 * @since 1.1
 * @see DataSourceAccessor
 */
public class RoundRobinNpjtAccessor extends RoundRobinAccessor {

    /**
     * Vararg constructor
     *
     * @param jts data sources
     */
    public RoundRobinNpjtAccessor(NamedParameterJdbcTemplate... jts) {
        this(asList(jts));
    }

    /**
     * Main constructor
     *
     * @param target data sources
     */
    public RoundRobinNpjtAccessor(Collection target) {
        super(target);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy