本文整理汇总了Java中org.onosproject.ovsdb.rfc.message.MonitorRequest类的典型用法代码示例。如果您正苦于以下问题:Java MonitorRequest类的具体用法?Java MonitorRequest怎么用?Java MonitorRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MonitorRequest类属于org.onosproject.ovsdb.rfc.message包,在下文中一共展示了MonitorRequest类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAllColumnsMonitorRequest
import org.onosproject.ovsdb.rfc.message.MonitorRequest; //导入依赖的package包/类
/**
* Returns MonitorRequest, refer to RFC7047's Section 4.1.5.
* @param tableSchema entity
* @return MonitorRequest
*/
private static MonitorRequest getAllColumnsMonitorRequest(TableSchema tableSchema) {
String tableName = tableSchema.name();
Set<String> columns = tableSchema.getColumnNames();
MonitorSelect select = new MonitorSelect(true, true, true, true);
MonitorRequest monitorRequest = new MonitorRequest(tableName, columns, select);
return monitorRequest;
}
示例2: getMonitorParams
import org.onosproject.ovsdb.rfc.message.MonitorRequest; //导入依赖的package包/类
/**
* Returns params of monitor method, refer to RFC7047's Section 4.1.5.
* @param monotorId json-value, refer to RFC7047's Section 4.1.5.
* @param dbSchema DatabaseSchema entity
* @return List of Object, the params of monitor request
*/
public static List<Object> getMonitorParams(String monotorId, DatabaseSchema dbSchema) {
Set<String> tables = dbSchema.getTableNames();
Map<String, MonitorRequest> mrMap = Maps.newHashMap();
for (String tableName : tables) {
TableSchema tableSchema = dbSchema.getTableSchema(tableName);
MonitorRequest monitorRequest = getAllColumnsMonitorRequest(tableSchema);
mrMap.put(tableName, monitorRequest);
}
return Lists.newArrayList(dbSchema.name(), monotorId, mrMap);
}