use of com.alibaba.cobar.CobarPrivileges 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;
}
use of com.alibaba.cobar.CobarPrivileges in project cobar by alibaba.
the class ManagerConnectionFactory method getConnection.
@Override
protected FrontendConnection getConnection(SocketChannel channel) {
ManagerConnection c = new ManagerConnection(channel);
c.setPrivileges(new CobarPrivileges());
c.setQueryHandler(new ManagerQueryHandler(c));
return c;
}
Aggregations