Class IASValue<T>

java.lang.Object
org.eso.ias.types.IASValue<T>

public class IASValue<T> extends Object
The view of a heterogeneous inputs in the java code and in the BSDB. Objects of this class are immutable i.e. updating returns a new immutable object
Author:
acaproni
  • Field Details

    • value

      public final T value
      The value of the HIO
    • readFromMonSysTStamp

      public final Optional<Long> readFromMonSysTStamp
      The point in time when the value has been read from the monitored system (set by the plugin only)
    • productionTStamp

      public final Optional<Long> productionTStamp
      The point in time when the the value has bene produced by a plugin, a DASO or a core tool This timestamp is updated when the plugin re-send the last computed value to the converter
    • sentToConverterTStamp

      public final Optional<Long> sentToConverterTStamp
      The point in time when the plugin sent the value to the converter
    • receivedFromPluginTStamp

      public final Optional<Long> receivedFromPluginTStamp
      The point in time when the converter received the value from the plugin
    • convertedProductionTStamp

      public final Optional<Long> convertedProductionTStamp
      The point in time when the converter generated the value from the data structure received by the plugin
    • dependentsFullRuningIds

      public final Optional<Set<String>> dependentsFullRuningIds
      The unmodifiable set of the full running identifiers of the dependent monitor point, if any
    • props

      public final Optional<Map<String,String>> props
      Unmodifiable map of additional properties, if any
    • sentToBsdbTStamp

      public final Optional<Long> sentToBsdbTStamp
      The point in time when the value has been sent to the BSDB Note that this timestamp is set
      • by the converter when it sends the converted value to the BSDB
      • by the DASU when it publishes the output to the BSDB
    • readFromBsdbTStamp

      public final Optional<Long> readFromBsdbTStamp
      The point in time when the value has been read from the BSDB
    • mode

      public final OperationalMode mode
      The mode of the input
      See Also:
    • iasValidity

      public final IasValidity iasValidity
      The validity
    • id

      public final String id
      The identifier of the input
      See Also:
      • Identifier
    • fullRunningId

      public final String fullRunningId
      The full identifier of the input concatenated with that of its parents.
      See Also:
      • Identifier
    • valueType

      public final IASTypes valueType
      The IAS representation of the type of this input.
      See Also:
  • Constructor Details

    • IASValue

      public IASValue(T value, OperationalMode mode, IasValidity iasValidity, String fullRunningId, IASTypes valueType, Optional<Long> readFromMonSysTStamp, Optional<Long> productionTStamp, Optional<Long> sentToConverterTStamp, Optional<Long> receivedFromPluginTStamp, Optional<Long> convertedProductionTStamp, Optional<Long> sentToBsdbTStamp, Optional<Long> readFromBsdbTStamp, Optional<Set<String>> dependentsFullRuningIds, Optional<Map<String,String>> properties)
      Constructor
      Parameters:
      value - The value of the output
      mode - The new mode of the output
      iasValidity - The validity
      fullRunningId - : The full running id of this input and its parents
      valueType - : the IAS type of this input
      readFromMonSysTStamp - : the point in time when the value has been read from the monitored system
      productionTStamp - The point in time when the value has bene produced by a plugin, a DASU or a core tool
      sentToConverterTStamp - The point in time when the plugin sent the value to the converter
      receivedFromPluginTStamp - The point in time when the converter received the value from the plugin
      convertedProductionTStamp - The point in time when the converter generated the value from the data structure received by the plugin
      sentToBsdbTStamp - The point in time when the value has been sent to the BSDB
      readFromBsdbTStamp - The point in time when the value has been read from the BSDB
  • Method Details

    • updateValue

      public <X extends T> IASValue<T> updateValue(X newValue)
      Build a new IASValue with the passed value
      Parameters:
      newValue - The value to set in the new IASValue
      Returns:
      The new IASValue with the updated value
    • updateMode

      public IASValue<T> updateMode(OperationalMode newMode)
      Build a new IASValue with the passed mode
      Parameters:
      newMode - The mode to set in the new IASValue
      Returns:
      The new IASValue with the updated mode
    • updateFullIdsOfDependents

      public IASValue<T> updateFullIdsOfDependents(Collection<String> depfFullIDs)
      Build a new IASValue with the passed list of fullRunningIds of the dependent monitor point
      Parameters:
      depfFullIDs - The mode to set in the new IASValue
      Returns:
      The new IASValue with the updated mode
    • updateProperties

      public IASValue<T> updateProperties(Map<String,String> properties)
      Update the additional properties
      Parameters:
      properties - The new additional properties (can be null)
      Returns:
      A new IASValue with updated properties
    • updateValidity

      public IASValue<T> updateValidity(IasValidity validity)
      Build a new IASValue with the passed validity
      Parameters:
      validity - the validity
      Returns:
      The new IASValue with the updated validity
    • updateMonSysProdTime

      public IASValue<T> updateMonSysProdTime(long timestamp)
      Build a new IASValue with the passed monitored system production time
      Parameters:
      timestamp - The value to set in the new IASValue
      Returns:
      The new IASValue with the updated timestamp
    • updateProdTime

      public IASValue<T> updateProdTime(long timestamp)
      Build a new IASValue with the passed production time
      Parameters:
      timestamp - The value to set in the new IASValue
      Returns:
      The new IASValue with the updated timestamp
    • updateSentToConverterTime

      public IASValue<T> updateSentToConverterTime(long timestamp)
      Build a new IASValue with the passed time when sent to the converter
      Parameters:
      timestamp - The value to set in the new IASValue
      Returns:
      The new IASValue with the updated timestamp
    • updateRecvFromPluginTime

      public IASValue<T> updateRecvFromPluginTime(long timestamp)
      Build a new IASValue with the passed time when received from plugin
      Parameters:
      timestamp - The value to set in the new IASValue
      Returns:
      The new IASValue with the updated timestamp
    • updateConverterProdTime

      public IASValue<T> updateConverterProdTime(long timestamp)
      Build a new IASValue with the passed time when produced by Converter
      Parameters:
      timestamp - the timestamp
      Returns:
      The new IASValue with the updated timestamp
    • updateSentToBsdbTime

      public IASValue<T> updateSentToBsdbTime(long timestamp)
      Build a new IASValue with the passed time when sent to BSDB
      Parameters:
      timestamp - the timestamp
      Returns:
      The new IASValue with the updated timestamp
    • updateReadFromBsdbTime

      public IASValue<T> updateReadFromBsdbTime(long timestamp)
      Build a new IASValue with the passed time when received from BSDB
      Parameters:
      timestamp - the timestamp
      Returns:
      The new IASValue with the updated timestamp
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • build

      public static <X> IASValue<?> build(X value, OperationalMode mode, IasValidity iasValidity, String fullRunningId, IASTypes valueType)
      Factory method to build IASValues of the passed type with no times.
      Parameters:
      value - The value
      mode - The operational mode
      iasValidity - The validity
      fullRunningId - Full running ID
      valueType - The type of the value
      Returns:
      A IasValue initialized with the passed parameters and no timestamps
    • build

      public static <X> IASValue<?> build(X value, OperationalMode mode, IasValidity iasValidity, String fullRunningId, IASTypes valueType, Long readFromMonSysTStamp, Long productionTStamp, Long sentToConverterTStamp, Long receivedFromPluginTStamp, Long convertedProductionTStamp, Long sentToBsdbTStamp, Long readFromBsdbTStamp, Set<String> dependentsFullrunningIds, Map<String,String> properties)
      Factory method to build IASValues of the passed type.
      Parameters:
      value - The value
      mode - The operational mode
      iasValidity - The validity
      fullRunningId - Full running ID
      valueType - The type of the value
      readFromMonSysTStamp - : the pont in time when the value has been read from the monitored system
      productionTStamp - The point in time when the value has been produced by a plugin, a DASU or a core tool
      sentToConverterTStamp - The point in time when the plugin sent the value to the converter
      receivedFromPluginTStamp - The point in time when the converter received the value from the plugin
      convertedProductionTStamp - The point in time when the converter generated the value from the data structure rceived by the plugin
      sentToBsdbTStamp - The point in time when the value has been sent to the BSDB
      readFromBsdbTStamp - The point in time when the value has been read from the BSDB
      dependentsFullrunningIds - The full running IDs of the dependent monitor points; can be null
      properties - Additional properties (can be null)
      Returns:
      A IasValue initialized with the passed parameters
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getProperty

      public Optional<String> getProperty(String key)
      Get the value of the property with the passed key, if it exists.
      Parameters:
      key - the key
      Returns:
      the value of the property or empty if a property with the given key does not exist
    • putProp

      public IASValue<T> putProp(String key, String value)
      Build a new IASValue with a new key,value couple in the map of properties
      Parameters:
      key - The key
      value - The value of the property
      Returns:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object