/** * <p>commitBuilder</p> */ public void commitBuilder() { if (isPersistDisabled()) { LOG.debug("Persist disabled for {}", m_builder.getName()); return; } try { m_builder.commit(); } catch (PersistException e) { LOG.error("Unable to persist data for {}", m_builder.getName(), e); } m_builder = null; }
/** {@inheritDoc} */ @Override public void persistNumericAttribute(CollectionAttribute attribute) { boolean shouldIgnorePersist = isIgnorePersist() && AttributeType.COUNTER.equals(attribute.getType()); LOG.debug("Persisting {} {}", attribute, (shouldIgnorePersist ? ". Ignoring value because of sysUpTime changed." : "")); Number value = shouldIgnorePersist ? Double.NaN : attribute.getNumericValue(); m_builder.setAttributeValue(attribute.getAttributeType(), value); m_builder.setAttributeMetadata(attribute.getMetricIdentifier(), attribute.getName()); }