本文整理汇总了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());
}
}
}
示例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);
}
示例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);
}
}
示例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());
}
}
示例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());
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
}
}
示例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());
}
}
}
示例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;
}