当前位置: 首页>>代码示例>>Java>>正文


Java EventHistory.EV_HISTORY_DEFAULT_SIZE属性代码示例

本文整理汇总了Java中net.floodlightcontroller.util.EventHistory.EV_HISTORY_DEFAULT_SIZE属性的典型用法代码示例。如果您正苦于以下问题:Java EventHistory.EV_HISTORY_DEFAULT_SIZE属性的具体用法?Java EventHistory.EV_HISTORY_DEFAULT_SIZE怎么用?Java EventHistory.EV_HISTORY_DEFAULT_SIZE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.floodlightcontroller.util.EventHistory的用法示例。


在下文中一共展示了EventHistory.EV_HISTORY_DEFAULT_SIZE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleEvHistReq

@Get("json")
public EventHistory<EventHistoryTopologyCluster> handleEvHistReq() {

    // Get the event history count. Last <count> events would be returned
    String evHistCount = (String)getRequestAttributes().get("count");
    int    count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
    try {
        count = Integer.parseInt(evHistCount);
    }
    catch(NumberFormatException nFE) {
        // Invalid input for event count - use default value
    }

    LinkDiscoveryManager topoManager =
            (LinkDiscoveryManager)getContext().getAttributes().
            get(ILinkDiscoveryService.class.getCanonicalName());
    if (topoManager != null) {
        return new EventHistory<EventHistoryTopologyCluster>(
                topoManager.evHistTopologyCluster, count);
    }
    
    return null;
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:23,代码来源:EventHistoryTopologyClusterResource.java

示例2: handleEvHistReq

@Get("json")
public EventHistory<EventHistoryTopologySwitch> handleEvHistReq() {

    // Get the event history count. Last <count> events would be returned
    String evHistCount = (String)getRequestAttributes().get("count");
    int    count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
    try {
        count = Integer.parseInt(evHistCount);
    }
    catch(NumberFormatException nFE) {
        // Invalid input for event count - use default value
    }

    LinkDiscoveryManager topoManager =
       (LinkDiscoveryManager)getContext().getAttributes().
           get(ILinkDiscoveryService.class.getCanonicalName());

    return new EventHistory<EventHistoryTopologySwitch>(
                            topoManager.evHistTopologySwitch, count);
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:20,代码来源:EventHistoryTopologySwitchResource.java

示例3: handleEvHistReq

@Get("json")
public EventHistory<EventHistoryTopologyLink> handleEvHistReq() {

    // Get the event history count. Last <count> events would be returned
    String evHistCount = (String)getRequestAttributes().get("count");
    int    count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
    try {
        count = Integer.parseInt(evHistCount);
    }
    catch(NumberFormatException nFE) {
        // Invalid input for event count - use default value
    }

    LinkDiscoveryManager linkDiscoveryManager =
            (LinkDiscoveryManager)getContext().getAttributes().
            get(ILinkDiscoveryService.class.getCanonicalName());
    if (linkDiscoveryManager != null) {
        return new EventHistory<EventHistoryTopologyLink>(
                linkDiscoveryManager.evHistTopologyLink, count);
    }
    
    return null;
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:23,代码来源:EventHistoryTopologyLinkResource.java


注:本文中的net.floodlightcontroller.util.EventHistory.EV_HISTORY_DEFAULT_SIZE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。