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


Java LabelResourceService类代码示例

本文整理汇总了Java中org.onosproject.incubator.net.resource.label.LabelResourceService的典型用法代码示例。如果您正苦于以下问题:Java LabelResourceService类的具体用法?Java LabelResourceService怎么用?Java LabelResourceService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    Collection<LabelResource> result =
            lrs.applyFromGlobalPool(Long.parseLong(applyNum));
    if (result.size() > 0) {
        for (Iterator<LabelResource> iterator = result.iterator(); iterator
                .hasNext();) {
            DefaultLabelResource defaultLabelResource = (DefaultLabelResource) iterator
                    .next();
            print(FMT, defaultLabelResource.deviceId().toString(),
                  defaultLabelResource.labelResourceId().toString());
        }
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:GlobalLabelApplyCommand.java

示例2: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    Set<LabelResourceId> release = new HashSet<LabelResourceId>();
    String[] labelIds = releaseLabelIds.split(",");
    LabelResourceId resource = null;
    for (int i = 0; i < labelIds.length; i++) {
        resource = LabelResourceId.labelResourceId(Long.parseLong(labelIds[i]));
        release.add(resource);
    }
    lrs.releaseToGlobalPool(release);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:13,代码来源:GlobalLabelReleaseCommand.java

示例3: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    LabelResourcePool pool = lrs.getDeviceLabelResourcePool(DeviceId
            .deviceId(deviceId));
    if (pool != null) {
        print(FMT, pool.deviceId().toString(), pool.beginLabel(),
              pool.endLabel(), pool.totalNum(), pool.usedNum(),
              pool.currentUsedMaxLabelId(), pool.releaseLabelId()
                      .toString());
    } else {
        print(FMT, deviceId, null, null, null, null, null, null);
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:15,代码来源:LabelResourceCommand.java

示例4: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    LabelResourcePool pool = lrs.getGlobalLabelResourcePool();
    if (pool != null) {
        print(FMT, pool.deviceId().toString(), pool.beginLabel(),
              pool.endLabel(), pool.totalNum(), pool.usedNum(),
              pool.currentUsedMaxLabelId(), pool.releaseLabelId()
                      .toString());
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:12,代码来源:GlobalLabelCommand.java

示例5: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    Collection<LabelResource> result = lrs.applyFromDevicePool(DeviceId
            .deviceId(deviceId), Long.parseLong(applyNum));
    if (result.size() > 0) {
        for (Iterator<LabelResource> iterator = result.iterator(); iterator
                .hasNext();) {
            DefaultLabelResource defaultLabelResource = (DefaultLabelResource) iterator
                    .next();
            print(FMT, defaultLabelResource.deviceId().toString(),
                  defaultLabelResource.labelResourceId().toString());
        }
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:LabelApplyCommand.java

示例6: initialize

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
/**
 * Initialization of label manager interfaces and pce store.
 *
 * @param labelRsrcAdminService label resource admin service
 * @param labelRsrcService label resource service
 * @param flowObjectiveService flow objective service to push device label information
 * @param appId application id
 * @param pceStore PCE label store
 * @param deviceService device service
 */
public void initialize(LabelResourceAdminService labelRsrcAdminService, LabelResourceService labelRsrcService,
                       FlowObjectiveService flowObjectiveService, ApplicationId appId, PceStore pceStore,
                       DeviceService deviceService) {
    this.labelRsrcAdminService = labelRsrcAdminService;
    this.labelRsrcService = labelRsrcService;
    this.flowObjectiveService = flowObjectiveService;
    this.pceStore = pceStore;
    this.appId = appId;
    this.deviceService = deviceService;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:21,代码来源:PceccSrTeBeHandler.java

示例7: initialize

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
/**
 * Initialization of label manager interfaces and pce store.
 *
 * @param labelRsrcAdminService label resource admin service
 * @param labelRsrcService label resource service
 * @param clientController client controller
 * @param pceStore PCE label store
 * @param deviceService device service
 */
public void initialize(LabelResourceAdminService labelRsrcAdminService,
                       LabelResourceService labelRsrcService,
                       PcepClientController clientController,
                       PceLabelStore pceStore,
                       DeviceService deviceService) {
    this.labelRsrcAdminService = labelRsrcAdminService;
    this.labelRsrcService = labelRsrcService;
    this.clientController = clientController;
    this.pceStore = pceStore;
    this.deviceService = deviceService;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:21,代码来源:PceccSrTeBeHandler.java

示例8: initialize

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
/**
 * Initialization of label manager and pce store.
 *
 * @param labelRsrcService label resource service
 * @param deviceService device service
 * @param pceStore pce label store
 * @param clientController client controller
 */
public void initialize(LabelResourceService labelRsrcService,
                       DeviceService deviceService,
                       PceLabelStore pceStore,
                       PcepClientController clientController) {
    this.labelRsrcService = labelRsrcService;
    this.deviceService = deviceService;
    this.pceStore = pceStore;
    this.clientController = clientController;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:18,代码来源:BasicPceccHandler.java

示例9: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    Collection<LabelResource> result =
            lrs.applyFromGlobalPool(Long.parseLong(applyNum));
    if (!result.isEmpty()) {
        for (Iterator<LabelResource> iterator = result.iterator(); iterator
                .hasNext();) {
            DefaultLabelResource defaultLabelResource = (DefaultLabelResource) iterator
                    .next();
            print(FMT, defaultLabelResource.deviceId().toString(),
                  defaultLabelResource.labelResourceId().toString());
        }
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:16,代码来源:GlobalLabelApplyCommand.java

示例10: execute

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
@Override
protected void execute() {
    LabelResourceService lrs = get(LabelResourceService.class);
    Collection<LabelResource> result = lrs.applyFromDevicePool(DeviceId
            .deviceId(deviceId), Long.parseLong(applyNum));
    if (!result.isEmpty()) {
        for (Iterator<LabelResource> iterator = result.iterator(); iterator
                .hasNext();) {
            DefaultLabelResource defaultLabelResource = (DefaultLabelResource) iterator
                    .next();
            print(FMT, defaultLabelResource.deviceId().toString(),
                  defaultLabelResource.labelResourceId().toString());
        }
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:16,代码来源:LabelApplyCommand.java

示例11: initialize

import org.onosproject.incubator.net.resource.label.LabelResourceService; //导入依赖的package包/类
/**
 * Initialization of label manager and pce store.
 *
 * @param labelRsrcService label resource service
 * @param flowObjectiveService flow objective service to push device label information
 * @param appId applicaton id
 * @param pceStore pce label store
 */
public void initialize(LabelResourceService labelRsrcService, FlowObjectiveService flowObjectiveService,
                       ApplicationId appId, PceStore pceStore) {
    this.labelRsrcService = labelRsrcService;
    this.flowObjectiveService = flowObjectiveService;
    this.appId = appId;
    this.pceStore = pceStore;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:16,代码来源:BasicPceccHandler.java


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