本文整理汇总了Java中com.alibaba.cobar.manager.response.ShowDataSource类的典型用法代码示例。如果您正苦于以下问题:Java ShowDataSource类的具体用法?Java ShowDataSource怎么用?Java ShowDataSource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ShowDataSource类属于com.alibaba.cobar.manager.response包,在下文中一共展示了ShowDataSource类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handle
import com.alibaba.cobar.manager.response.ShowDataSource; //导入依赖的package包/类
public static void handle(String stmt, ManagerConnection c, int offset) {
int rs = ManagerParseShow.parse(stmt, offset);
switch (rs & 0xff) {
case ManagerParseShow.COMMAND:
ShowCommand.execute(c);
break;
case ManagerParseShow.COLLATION:
ShowCollation.execute(c);
break;
case ManagerParseShow.CONNECTION:
ShowConnection.execute(c);
break;
case ManagerParseShow.CONNECTION_SQL:
ShowConnectionSQL.execute(c);
break;
case ManagerParseShow.DATABASE:
ShowDatabase.execute(c);
break;
case ManagerParseShow.DATASOURCE:
ShowDataSource.execute(c, null);
break;
case ManagerParseShow.DATASOURCE_WHERE: {
String name = stmt.substring(rs >>> 8).trim();
if (StringUtil.isEmpty(name)) {
c.writeErrMessage(ErrorCode.ER_YES, "Unsupported statement");
} else {
// ShowDataSource.execute(c, name);
}
break;
}
case ManagerParseShow.HELP:
ShowHelp.execute(c);
break;
case ManagerParseShow.PARSER:
ShowParser.execute(c);
break;
case ManagerParseShow.PROCESSOR:
ShowProcessor.execute(c);
break;
case ManagerParseShow.ROUTER:
ShowRouter.execute(c);
break;
case ManagerParseShow.SERVER:
ShowServer.execute(c);
break;
case ManagerParseShow.SQL:
ShowSQL.execute(c, ParseUtil.getSQLId(stmt));
break;
case ManagerParseShow.SQL_DETAIL:
ShowSQLDetail.execute(c, ParseUtil.getSQLId(stmt));
break;
case ManagerParseShow.SQL_EXECUTE:
ShowSQLExecute.execute(c);
break;
// case ManagerParseShow.SQL_SLOW:
// ShowSQLSlow.execute(c);
// break;
case ManagerParseShow.THREADPOOL:
ShowThreadPool.execute(c);
break;
case ManagerParseShow.TIME_CURRENT:
ShowTime.execute(c, ManagerParseShow.TIME_CURRENT);
break;
case ManagerParseShow.TIME_STARTUP:
ShowTime.execute(c, ManagerParseShow.TIME_STARTUP);
break;
case ManagerParseShow.VARIABLES:
ShowVariables.execute(c);
break;
case ManagerParseShow.VERSION:
ShowVersion.execute(c);
break;
default:
c.writeErrMessage(ErrorCode.ER_YES, "Unsupported statement");
}
}