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

net.sf.hajdbc.invocation.TransactionalExecutorProvider Maven / Gradle / Ivy

There is a newer version: 3.6.61
Show newest version
package net.sf.hajdbc.invocation;

import java.util.concurrent.ExecutorService;

import net.sf.hajdbc.Database;
import net.sf.hajdbc.DatabaseCluster;
import net.sf.hajdbc.invocation.AllResultsCollector.ExecutorProvider;

public class TransactionalExecutorProvider implements ExecutorProvider
{
	private final boolean end;
	
	public TransactionalExecutorProvider(boolean end)
	{
		this.end = end;
	}
	
	@Override
	public > ExecutorService getExecutor(DatabaseCluster cluster)
	{
		return cluster.getTransactionMode().getTransactionExecutor(cluster.getExecutor(), this.end);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy