/** * <p>getIfIndices</p> * * @return a {@link java.util.Set} object. */ public Set<Integer> getIfIndices() { final Set<Integer> ifIndices = new LinkedHashSet<>(); for(final SnmpInstId inst : getInstances()) { ifIndices.add(inst.toInt()); } return ifIndices; }
/** {@inheritDoc} */ @Override protected IfXTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, Object val) { return new IfXTableEntry(inst.toInt()); }
/** {@inheritDoc} */ @Override protected IfXTableEntry createTableEntry(SnmpObjId base, SnmpInstId inst, Object val) { return new IfXTableEntry(inst.toInt()); }
/** {@inheritDoc} */ @Override public SnmpCollectionResource findResource(SnmpInstId inst) { return getIfMap().get(inst.toInt()); }
/** * <p>getIfIndices</p> * * @return a {@link java.util.Set} object. */ public Set<Integer> getIfIndices() { final Set<Integer> ifIndices = new LinkedHashSet<>(); for(final SnmpInstId inst : getInstances()) { ifIndices.add(inst.toInt()); } return ifIndices; }
/** {@inheritDoc} */ @Override public SnmpCollectionResource findAliasedResource(SnmpInstId inst, String ifAlias) { Integer key = inst.toInt(); AliasedResource resource = (AliasedResource) m_aliasedIfs.get(key); if (resource == null) { IfInfo ifInfo = (IfInfo)m_ifResourceType.findResource(inst); if(ifInfo == null) { LOG.info("Not creating an aliased resource for ifInfo = null"); } else { LOG.info("Creating an aliased resource for {}", ifInfo); resource = new AliasedResource(this, m_params.getDomain(), ifInfo, m_params.getIfAliasComment(), ifAlias); m_aliasedIfs.put(key, resource); } } return resource; }
public Integer getIfIndex() { final SnmpValue value = getValue(IF_INDEX); if (value != null) { return value.toInt(); } else { // ifIndex is the instance id as well final SnmpInstId inst = getInstance(); if (inst != null && inst.length() == 1) { return inst.toInt(); } } return null; }
public Integer getIfIndex() { final SnmpValue value = getValue(IF_INDEX); if (value != null) { return value.toInt(); } else { // ifIndex is the instance id as well final SnmpInstId inst = getInstance(); if (inst != null && inst.length() == 1) { return inst.toInt(); } } return null; }
/** {@inheritDoc} */ @Override public void storeResult(SnmpResult res) { String key = res.getAbsoluteInstance().toString(); putValue(key, res.getValue()); List<SnmpAttributeType> attrTypes = findAttributeTypeForOid(res.getBase(), res.getInstance()); if (attrTypes.isEmpty()) { throw new IllegalArgumentException("Received result for unexpected oid ["+res.getBase()+"].["+res.getInstance()+"]"); } for (SnmpAttributeType attrType : attrTypes) { if (attrType.getInstance().equals(MibObject.INSTANCE_IFINDEX)) { putIfIndex(res.getInstance().toInt()); } attrType.storeResult(m_collectionSet, this, res); LOG.debug("storeResult: added value for {}: {}", attrType.getAlias(), res.toString()); } }
LOG.debug("poll: instance={} admin tag={} value={} oper state={} ignoreThreshold={} latest RTT{}", ipslaInstance.toInt(), adminTag, tagResults.get(ipslaInstance), operStateResults.get(ipslaInstance), ignoreThreshold, latestRttResults.get(ipslaInstance));