本文整理汇总了Java中net.floodlightcontroller.counter.ICounterStoreService.TitleDelimitor方法的典型用法代码示例。如果您正苦于以下问题:Java ICounterStoreService.TitleDelimitor方法的具体用法?Java ICounterStoreService.TitleDelimitor怎么用?Java ICounterStoreService.TitleDelimitor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.floodlightcontroller.counter.ICounterStoreService
的用法示例。
在下文中一共展示了ICounterStoreService.TitleDelimitor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOneSwitchCounterJson
import net.floodlightcontroller.counter.ICounterStoreService; //导入方法依赖的package包/类
protected void getOneSwitchCounterJson(Map<String, Object> model,
String switchID, String counterName) {
String fullCounterName = "";
try {
counterName = URLDecoder.decode(counterName, "UTF-8");
fullCounterName =
switchID + ICounterStoreService.TitleDelimitor + counterName;
} catch (UnsupportedEncodingException e) {
//Just leave counterTitle undecoded if there is an issue - fail silently
}
ICounter counter = this.counterStore.getCounter(fullCounterName);
Map<String, Long> sample = new HashMap<String, Long> ();
if (counter != null) {
sample.put(counter.getCounterDate().toString(),
counter.getCounterValue().getLong());
model.put(switchID, sample);
}
}
示例2: getOneSwitchCounterCategoriesJson
import net.floodlightcontroller.counter.ICounterStoreService; //导入方法依赖的package包/类
protected void getOneSwitchCounterCategoriesJson(Map<String, Object> model,
String switchID,
String counterName,
String layer) {
String fullCounterName = "";
NetworkLayer nl = NetworkLayer.L3;
try {
counterName = URLDecoder.decode(counterName, "UTF-8");
layer = URLDecoder.decode(layer, "UTF-8");
fullCounterName = switchID + ICounterStoreService.TitleDelimitor + counterName;
} catch (UnsupportedEncodingException e) {
//Just leave counterTitle undecoded if there is an issue - fail silently
}
if (layer.compareToIgnoreCase("4") == 0) {
nl = NetworkLayer.L4;
}
List<String> categories = this.counterStore.getAllCategories(fullCounterName, nl);
if (categories != null) {
model.put(fullCounterName + "." + layer, categories);
}
}
示例3: getOneSwitchCounterJson
import net.floodlightcontroller.counter.ICounterStoreService; //导入方法依赖的package包/类
protected void getOneSwitchCounterJson(Map<String, Object> model,
String switchID, String counterName) {
String fullCounterName = "";
try {
counterName = URLDecoder.decode(counterName, "UTF-8");
fullCounterName =
switchID + ICounterStoreService.TitleDelimitor + counterName;
} catch (UnsupportedEncodingException e) {
//Just leave counterTitle undecoded if there is an issue - fail silently
}
ICounter counter = this.counterStore.getCounter(fullCounterName);
Map<String, Long> sample = new HashMap<String, Long> ();
if (counter != null) {
sample.put(counter.getCounterDate().toString(),
counter.getCounterValue().getLong());
model.put(switchID, sample);
}
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:SwitchCounterResource.java
示例4: getOneSwitchCounterCategoriesJson
import net.floodlightcontroller.counter.ICounterStoreService; //导入方法依赖的package包/类
protected void getOneSwitchCounterCategoriesJson(Map<String, Object> model,
String switchID,
String counterName,
String layer) {
String fullCounterName = "";
NetworkLayer nl = NetworkLayer.L3;
try {
counterName = URLDecoder.decode(counterName, "UTF-8");
layer = URLDecoder.decode(layer, "UTF-8");
fullCounterName = switchID + ICounterStoreService.TitleDelimitor + counterName;
} catch (UnsupportedEncodingException e) {
//Just leave counterTitle undecoded if there is an issue - fail silently
}
if (layer.compareToIgnoreCase("4") == 0) {
nl = NetworkLayer.L4;
}
List<String> categories = this.counterStore.getAllCategories(fullCounterName, nl);
if (categories != null) {
model.put(fullCounterName + "." + layer, categories);
}
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:SwitchCounterCategoriesResource.java