use of org.onosproject.incubator.net.resource.label.LabelResourceEvent in project onos by opennetworkinglab.
the class DistributedLabelResourceStore method internalDestroy.
private boolean internalDestroy(DeviceId deviceId) {
Versioned<LabelResourcePool> poolOld = resourcePool.get(deviceId);
if (poolOld != null) {
resourcePool.remove(deviceId);
LabelResourceEvent event = new LabelResourceEvent(Type.POOL_DESTROYED, poolOld.value());
notifyDelegate(event);
}
log.info("success to destroy the label resource pool of device id {}", deviceId);
return true;
}
use of org.onosproject.incubator.net.resource.label.LabelResourceEvent in project onos by opennetworkinglab.
the class DistributedLabelResourceStore method internalCreate.
private boolean internalCreate(LabelResourcePool pool) {
Versioned<LabelResourcePool> poolOld = resourcePool.get(pool.deviceId());
if (poolOld == null) {
resourcePool.put(pool.deviceId(), pool);
LabelResourceEvent event = new LabelResourceEvent(Type.POOL_CREATED, pool);
notifyDelegate(event);
return true;
}
return false;
}
Aggregations