Enum Class PersistencePriority

java.lang.Object
java.lang.Enum<PersistencePriority>
io.openems.common.channel.PersistencePriority
All Implemented Interfaces:
Serializable, Comparable<PersistencePriority>, Constable

public enum PersistencePriority extends Enum<PersistencePriority>
The PersistencePriority is used by...
  • Timedata.Rrd4j: persist Channel values locally
  • Controller.Api.MQTT: transmit Channel values via MQTT
  • Controller.Api.Backend: transmit Channel values to OpenEMS Backend

These services use the PersistencePriority to distinguish whether a value of a Channel should be:

  • persisted/transmitted in high resolution (e.g. once per second)
  • persisted/transmitted in low resolution (e.g. aggregated to 5 minutes values)
  • not persisted

The PersistencePriority of a Channel may be set via AbstractDoc::persistencePriority(). Defaults are:

  • HIGH for StateChannels
  • LOW for everything else
  • Enum Constant Details

    • VERY_LOW

      public static final PersistencePriority VERY_LOW
      Channels with at least this priority are by default (if not configured differently)...
      • Timedata.Rrd4j: not persisted
      • Controller.Api.MQTT: transmitted in high resolution
      • Controller.Api.Backend: not transmitted
    • LOW

      public static final PersistencePriority LOW
      Channels with at least this priority are by default (if not configured differently)...
    • MEDIUM

      public static final PersistencePriority MEDIUM
      Channels with at least this priority are by default (if not configured differently)...
      • Timedata.Rrd4j: persisted as aggregated values
    • HIGH

      public static final PersistencePriority HIGH
      Channels with at least this priority are by default (if not configured differently)...
      • Controller.Api.Backend: transmitted in high resolution (via TimestampedDataNotification), i.e. on every change or at least once every 5 minutes
    • VERY_HIGH

      public static final PersistencePriority VERY_HIGH
      VERY_HIGH is reserved for Channels of the `Core.Sum` Component.
  • Field Details

    • DEFAULT_PERSISTENCE_PRIORITY

      public static final PersistencePriority DEFAULT_PERSISTENCE_PRIORITY
  • Method Details

    • values

      public static PersistencePriority[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PersistencePriority valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isAtLeast

      public boolean isAtLeast(PersistencePriority other)
      Is this PersistencePriority at least as high as the given PersistencePriority?.
      Parameters:
      other - the given PersistencePriority
      Returns:
      true if this is equal or higher than other
    • isLowerThan

      public boolean isLowerThan(PersistencePriority other)
      Is this PersistencePriority at lower than the given PersistencePriority?.
      Parameters:
      other - the given PersistencePriority
      Returns:
      true if this is strictly lower than other