Examples of shouldPersist()


Examples of com.rackspacecloud.blueflood.rollup.MetricsPersistenceOptimizer.shouldPersist()

        try {
            final DataType metricType = metric.getDataType();
            final MetricsPersistenceOptimizer optimizer =
                    MetricsPersistenceOptimizerFactory.getOptimizer(metricType);

            return optimizer.shouldPersist(metric);
        } catch (Exception e) {
            // If we hit any exception, just persist the metric
            return true;
        }
    }
View Full Code Here

Examples of org.eclipse.jface.commands.PersistentState.shouldPersist()

      for (int j = 0; j < stateIds.length; j++) {
        final String stateId = stateIds[j];
        final State state = command.getState(stateId);
        if (state instanceof PersistentState) {
          final PersistentState persistentState = (PersistentState) state;
          if (persistentState.shouldPersist()) {
            persistentState.save(PrefUtil
                .getInternalPreferenceStore(),
                createPreferenceKey(command, stateId));
          }
        }
View Full Code Here

Examples of org.eclipse.jface.commands.PersistentState.shouldPersist()

  public final void dispose() {
    if (state != null) {
      state.dispose();
      if (state instanceof PersistentState) {
        final PersistentState persistableState = (PersistentState) state;
        if (persistableState.shouldPersist() && preferenceStore != null
            && preferenceKey != null) {
          persistableState.save(preferenceStore, preferenceKey);
        }
      }
    }
View Full Code Here

Examples of org.eclipse.jface.commands.PersistentState.shouldPersist()

  public final void load(final IPreferenceStore store,
      final String preferenceKey) {
    if (loadState() && state instanceof PersistentState) {
      final PersistentState persistableState = (PersistentState) state;
      if (persistableState.shouldPersist() && preferenceStore != null
          && preferenceKey != null) {
        persistableState.load(preferenceStore, preferenceKey);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.