return false; if (!Objects.equals(_key, other.getKey())) { return false;
public FlowHashIdMapBuilder(FlowHashIdMap 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(); if (base instanceof FlowHashIdMapImpl) { FlowHashIdMapImpl impl = (FlowHashIdMapImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.nodes.node.table.FlowHashIdMap>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public TableFlowUpdateState(final KeyedInstanceIdentifier<Table, TableKey> tablePath, final Table table) { tableRef = tablePath; tableKey = tablePath.getKey(); flowIdByHash = HashBiMap.create(); if(table != null) { final FlowHashIdMapping flowHashMapping = table.getAugmentation(FlowHashIdMapping.class); if (flowHashMapping != null) { final List<FlowHashIdMap> flowHashMap = flowHashMapping.getFlowHashIdMap() != null ? flowHashMapping.getFlowHashIdMap() : Collections.<FlowHashIdMap> emptyList(); for (final FlowHashIdMap flowHashId : flowHashMap) { try { flowIdByHash.put(flowHashId.getKey(), flowHashId.getFlowId()); } catch (final Exception e) { LOG.warn("flow hashing hit a duplicate for {} -> {}", flowHashId.getKey(), flowHashId.getFlowId()); } } } } }
public TableFlowUpdateState(final KeyedInstanceIdentifier<Table, TableKey> tablePath, final Table table) { tableRef = tablePath; tableKey = tablePath.getKey(); flowIdByHash = HashBiMap.create(); if(table != null) { final FlowHashIdMapping flowHashMapping = table.getAugmentation(FlowHashIdMapping.class); if (flowHashMapping != null) { final List<FlowHashIdMap> flowHashMap = flowHashMapping.getFlowHashIdMap() != null ? flowHashMapping.getFlowHashIdMap() : Collections.<FlowHashIdMap> emptyList(); for (final FlowHashIdMap flowHashId : flowHashMap) { try { flowIdByHash.put(flowHashId.getKey(), flowHashId.getFlowId()); } catch (final Exception e) { //flowHashId.getKey() too verbose for standard log. if(LOG.isDebugEnabled()) { final FlowId currData = flowIdByHash.get(flowHashId.getKey()); LOG.debug("flow hashing hit a duplicate for {} -> {}. Curr value: {} Equals:{}. Exception was raised:", flowHashId.getKey(), flowHashId.getFlowId(), currData, flowHashId.getFlowId().equals(currData), e); } else { LOG.warn("flow hashing hit a duplicate {}. Exception was raised: {}. Enable DEBUG for more detail.", flowHashId.getFlowId().toString().substring(0, Math.min(TRUNCATED_LOG_MESSAGE_LENGTH,flowHashId.getFlowId().toString().length())), e.getMessage().substring(0,Math.min(TRUNCATED_LOG_MESSAGE_LENGTH,e.getMessage().length()))); } } } } } }