public FlowHashIdMapBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private void updateHashCache(final ReadWriteTransaction trans, final FlowKey flowKey, final FlowHashIdMapKey hashingKey) { final FlowHashIdMapBuilder flHashIdMap = new FlowHashIdMapBuilder(); flHashIdMap.setFlowId(flowKey.getId()); flHashIdMap.setKey(hashingKey); final KeyedInstanceIdentifier<FlowHashIdMap, FlowHashIdMapKey> flHashIdent = tableRef .augmentation(FlowHashIdMapping.class).child(FlowHashIdMap.class, hashingKey); /* Add new FlowHashIdMap */ trans.put(LogicalDatastoreType.OPERATIONAL, flHashIdent, flHashIdMap.build()); }
private FlowHashIdMapImpl(FlowHashIdMapBuilder base) { if (base.getKey() == null) { this._key = new FlowHashIdMapKey( base.getHash() ); this._hash = base.getHash(); } else { this._key = base.getKey(); this._hash = _key.getHash(); } this._flowId = base.getFlowId(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private void updateHashCache(final ReadWriteTransaction trans, final FlowKey flowKey, final FlowHashIdMapKey hashingKey) { final FlowHashIdMapBuilder flHashIdMap = new FlowHashIdMapBuilder(); flHashIdMap.setFlowId(flowKey.getId()); flHashIdMap.setKey(hashingKey); final KeyedInstanceIdentifier<FlowHashIdMap, FlowHashIdMapKey> flHashIdent = tableRef .augmentation(FlowHashIdMapping.class).child(FlowHashIdMap.class, hashingKey); /* Add new FlowHashIdMap */ trans.put(LogicalDatastoreType.OPERATIONAL, flHashIdent, flHashIdMap.build()); }