use of com.alibaba.cobar.server.session.BlockingSession in project cobar by alibaba.
the class ServerConnectionFactory method getConnection.
@Override
protected FrontendConnection getConnection(SocketChannel channel) {
SystemConfig sys = CobarServer.getInstance().getConfig().getSystem();
ServerConnection c = new ServerConnection(channel);
c.setPrivileges(new CobarPrivileges());
c.setQueryHandler(new ServerQueryHandler(c));
// c.setPrepareHandler(new ServerPrepareHandler(c)); TODO prepare
c.setTxIsolation(sys.getTxIsolation());
c.setSession(new BlockingSession(c));
c.setSession2(new NonBlockingSession(c));
return c;
}
Aggregations