public MeterConfigStatsUpdatedBuilder(MeterConfigStatsUpdated base) { this._id = base.getId(); this._meterConfigStats = base.getMeterConfigStats(); this._nodeConnector = base.getNodeConnector(); this._transactionId = base.getTransactionId(); this._moreReplies = base.isMoreReplies(); if (base instanceof MeterConfigStatsUpdatedImpl) { MeterConfigStatsUpdatedImpl _impl = (MeterConfigStatsUpdatedImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }
@Override public void onMeterConfigStatsUpdated(final MeterConfigStatsUpdated notification) { final TransactionId transId = notification.getTransactionId(); final NodeId nodeId = notification.getId(); if ( ! isExpectedStatistics(transId, nodeId)) { LOG.debug("STAT-MANAGER - MeterConfigStatsUpdated: unregistred notification detect TransactionId {}", transId); if (notification.isMoreReplies()) { return;
private void comitConfMeterStats(final Optional<TransactionCacheContainer<?>> txContainer, final ReadWriteTransaction tx, final InstanceIdentifier<FlowCapableNode> fNodeIdent, final List<MeterKey> existMeterKeys) { Preconditions.checkNotNull(existMeterKeys); Preconditions.checkNotNull(txContainer); Preconditions.checkNotNull(fNodeIdent); Preconditions.checkNotNull(tx); final List<? extends TransactionAware> cacheNotifs = txContainer.get().getNotifications(); for (final TransactionAware notif : cacheNotifs) { if ( ! (notif instanceof MeterConfigStatsUpdated)) { break; } final List<MeterConfigStats> meterStats = ((MeterConfigStatsUpdated) notif).getMeterConfigStats(); if (meterStats == null) { break; } for (final MeterConfigStats meterStat : meterStats) { if (meterStat.getMeterId() != null) { final MeterBuilder meterBuilder = new MeterBuilder(meterStat); final MeterKey meterKey = new MeterKey(meterStat.getMeterId()); final InstanceIdentifier<Meter> meterRef = fNodeIdent.child(Meter.class, meterKey); final NodeMeterConfigStatsBuilder meterConfig = new NodeMeterConfigStatsBuilder(); meterConfig.setMeterConfigStats(new MeterConfigStatsBuilder(meterStat).build()); //Update augmented data meterBuilder.addAugmentation(NodeMeterConfigStats.class, meterConfig.build()); existMeterKeys.remove(meterKey); tx.put(LogicalDatastoreType.OPERATIONAL, meterRef, meterBuilder.build()); } } } }
@Override public void onMeterConfigStatsUpdated(final MeterConfigStatsUpdated notification) { final TransactionId transId = notification.getTransactionId(); final NodeId nodeId = notification.getId(); if ( ! isExpectedStatistics(transId, nodeId)) { LOG.debug("STAT-MANAGER - MeterConfigStatsUpdated: unregistred notification detect TransactionId {}", transId); if (notification.isMoreReplies()) { return;
private void comitConfMeterStats(final Optional<TransactionCacheContainer<?>> txContainer, final ReadWriteTransaction tx, final InstanceIdentifier<FlowCapableNode> fNodeIdent, final List<MeterKey> existMeterKeys) { Preconditions.checkNotNull(existMeterKeys); Preconditions.checkNotNull(txContainer); Preconditions.checkNotNull(fNodeIdent); Preconditions.checkNotNull(tx); final List<? extends TransactionAware> cacheNotifs = txContainer.get().getNotifications(); for (final TransactionAware notif : cacheNotifs) { if ( ! (notif instanceof MeterConfigStatsUpdated)) { break; } final List<MeterConfigStats> meterStats = ((MeterConfigStatsUpdated) notif).getMeterConfigStats(); if (meterStats == null) { break; } for (final MeterConfigStats meterStat : meterStats) { if (meterStat.getMeterId() != null) { final MeterBuilder meterBuilder = new MeterBuilder(meterStat); final MeterKey meterKey = new MeterKey(meterStat.getMeterId()); final InstanceIdentifier<Meter> meterRef = fNodeIdent.child(Meter.class, meterKey); final NodeMeterConfigStatsBuilder meterConfig = new NodeMeterConfigStatsBuilder(); meterConfig.setMeterConfigStats(new MeterConfigStatsBuilder(meterStat).build()); //Update augmented data meterBuilder.addAugmentation(NodeMeterConfigStats.class, meterConfig.build()); existMeterKeys.remove(meterKey); tx.put(LogicalDatastoreType.OPERATIONAL, meterRef, meterBuilder.build()); } } } }
if (other.getId() != null) { return false; } else if(!_id.equals(other.getId())) { return false; if (other.getMeterConfigStats() != null) { return false; } else if(!_meterConfigStats.equals(other.getMeterConfigStats())) { return false; if (other.getNodeConnector() != null) { return false; } else if(!_nodeConnector.equals(other.getNodeConnector())) { return false; if (other.getTransactionId() != null) { return false; } else if(!_transactionId.equals(other.getTransactionId())) { return false; if (other.isMoreReplies() != null) { return false; } else if(!_moreReplies.equals(other.isMoreReplies())) { return false;