Package com.alibaba.cobar.client.support.execution

Examples of com.alibaba.cobar.client.support.execution.ConcurrentRequest


                public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
                    return executor.insert(statementName, paramList);
                }
            };

            ConcurrentRequest request = new ConcurrentRequest();
            request.setDataSource(dataSourceToUse);
            request.setAction(callback);
            request.setExecutor(getDataSourceSpecificExecutors().get(identity));
            requests.add(request);
        }
        return getConcurrentRequestProcessor().process(requests);
    }
View Full Code Here


    public List<Object> executeInConcurrency(SqlMapClientCallback action,
                                             SortedMap<String, DataSource> dsMap) {
        List<ConcurrentRequest> requests = new ArrayList<ConcurrentRequest>();

        for (Map.Entry<String, DataSource> entry : dsMap.entrySet()) {
            ConcurrentRequest request = new ConcurrentRequest();
            request.setAction(action);
            request.setDataSource(entry.getValue());
            request.setExecutor(getDataSourceSpecificExecutors().get(entry.getKey()));
            requests.add(request);
        }

        List<Object> results = getConcurrentRequestProcessor().process(requests);
        return results;
View Full Code Here

TOP

Related Classes of com.alibaba.cobar.client.support.execution.ConcurrentRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.