use of com.actiontech.dble.backend.datasource.PhysicalDBNode in project dble by actiontech.
the class SingleNodeHandler method execute.
public void execute() throws Exception {
startTime = System.currentTimeMillis();
ServerConnection sc = session.getSource();
waitingResponse = true;
this.packetId = 0;
final BackendConnection conn = session.getTarget(node);
node.setRunOnSlave(rrs.getRunOnSlave());
if (session.tryExistsCon(conn, node)) {
execute(conn);
} else {
// create new connection
node.setRunOnSlave(rrs.getRunOnSlave());
ServerConfig conf = DbleServer.getInstance().getConfig();
PhysicalDBNode dn = conf.getDataNodes().get(node.getName());
dn.getConnection(dn.getDatabase(), session.getSource().isTxStart(), sc.isAutocommit(), node, this, node);
}
}
use of com.actiontech.dble.backend.datasource.PhysicalDBNode in project dble by actiontech.
the class LockTablesHandler method execute.
public void execute() throws Exception {
super.reset(this.rrs.getNodes().length);
for (final RouteResultsetNode node : rrs.getNodes()) {
BackendConnection conn = session.getTarget(node);
if (session.tryExistsCon(conn, node)) {
innerExecute(conn, node);
} else {
// create new connection
PhysicalDBNode dn = DbleServer.getInstance().getConfig().getDataNodes().get(node.getName());
dn.getConnection(dn.getDatabase(), session.getSource().isTxStart(), autocommit, node, this, node);
}
}
}
Aggregations