private boolean shouldPersistNow(Descriptor attribute, Descriptor mbean, String lastUpdateField) {
    int persist = getPersistPolicy(attribute, mbean);
    if (persist == PERSIST_NO_MORE_OFTEN_THAN) {
      Long period = getFieldTimeValue(attribute, mbean, "persistPeriod");
      long now = System.currentTimeMillis();
      Long lastUpdate = (Long) attribute.getFieldValue(lastUpdateField);
      return now - lastUpdate >= period;
    } else if (persist == PERSIST_NEVER) {
      return false;
    } else if (persist == PERSIST_ON_TIMER) {
      return false;
    } else if (persist == PERSIST_ON_UPDATE) {
      return true;
    } else {
      throw new ImplementationException(
          "Invalid persist value");
    }
  }
@author <a href="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>
@version $Revision: 1.14 $
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java