com.alexkasko.springjdbc.parallel.accessor.DataSourceAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parallel-queries Show documentation
Show all versions of parallel-queries Show documentation
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.
package com.alexkasko.springjdbc.parallel.accessor;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import java.util.Collection;
/**
* Read-only collection interface.
*
* @author alexkasko
* Date: 6/11/12
* @see RoundRobinAccessor
*/
public interface DataSourceAccessor extends Collection {
/**
*
*
* @return collection element
*/
/**
* Method to access collection element.
* Element is chosen by implementation.
*
* @param params may be used by implementation for choosing
* @return collection element
*/
T get(P params);
}