use of io.mycat.proxy.session.MycatSession in project Mycat2 by MyCATApache.
the class MycatMonitorCallback method getSession.
static Session getSession() {
SessionThread thread = getThread();
Session curSession = thread.getCurSession();
if (curSession instanceof MycatSession) {
return curSession;
} else if (curSession instanceof MySQLClientSession) {
MycatSession mycatSession = ((MySQLClientSession) curSession).getMycat();
if (mycatSession == null) {
return curSession;
} else {
return mycatSession;
}
} else {
throw new MycatException("unknown session");
}
}
Aggregations