Package org.eso.ias.types
Class IASValue<T>
java.lang.Object
org.eso.ias.types.IASValue<T>
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 Summary
Modifier and TypeFieldDescriptionThe point in time when the converter generated the value from the data structure received by the pluginThe unmodifiable set of the full running identifiers of the dependent monitor point, if anyfinal String
The full identifier of the input concatenated with that of its parents.final IasValidity
The validityfinal String
The identifier of the inputfinal OperationalMode
The mode of the inputThe 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 converterUnmodifiable map of additional properties, if anyThe point in time when the value has been read from the BSDBThe point in time when the value has been read from the monitored system (set by the plugin only)The point in time when the converter received the value from the pluginThe 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 BSDBThe point in time when the plugin sent the value to the converterfinal T
The value of the HIOfinal IASTypes
The IAS representation of the type of this input. -
Constructor Summary
ConstructorDescriptionIASValue
(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 -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.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.boolean
getProperty
(String key) Get the value of the property with the passed key, if it exists.int
hashCode()
Build a new IASValue with a new key,value couple in the map of propertiestoString()
updateConverterProdTime
(long timestamp) Build a new IASValue with the passed time when produced by ConverterupdateFullIdsOfDependents
(Collection<String> depfFullIDs) Build a new IASValue with the passed list of fullRunningIds of the dependent monitor pointupdateMode
(OperationalMode newMode) Build a new IASValue with the passed modeupdateMonSysProdTime
(long timestamp) Build a new IASValue with the passed monitored system production timeupdateProdTime
(long timestamp) Build a new IASValue with the passed production timeupdateProperties
(Map<String, String> properties) Update the additional propertiesupdateReadFromBsdbTime
(long timestamp) Build a new IASValue with the passed time when received from BSDBupdateRecvFromPluginTime
(long timestamp) Build a new IASValue with the passed time when received from pluginupdateSentToBsdbTime
(long timestamp) Build a new IASValue with the passed time when sent to BSDBupdateSentToConverterTime
(long timestamp) Build a new IASValue with the passed time when sent to the converterupdateValidity
(IasValidity validity) Build a new IASValue with the passed validityupdateValue
(X newValue) Build a new IASValue with the passed value
-
Field Details
-
value
The value of the HIO -
readFromMonSysTStamp
The point in time when the value has been read from the monitored system (set by the plugin only) -
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
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 -
dependentsFullRuningIds
The unmodifiable set of the full running identifiers of the dependent monitor point, if any -
props
Unmodifiable map of additional properties, if any -
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
The point in time when the value has been read from the BSDB -
mode
The mode of the input- See Also:
-
iasValidity
The validity -
id
The identifier of the input- See Also:
-
Identifier
-
fullRunningId
The full identifier of the input concatenated with that of its parents.- See Also:
-
Identifier
-
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 outputmode
- The new mode of the outputiasValidity
- The validityfullRunningId
- : The full running id of this input and its parentsvalueType
- : the IAS type of this inputreadFromMonSysTStamp
- : the point in time when the value has been read from the monitored systemproductionTStamp
- The point in time when the value has bene produced by a plugin, a DASU or a core toolsentToConverterTStamp
- The point in time when the plugin sent the value to the converterreceivedFromPluginTStamp
- The point in time when the converter received the value from the pluginconvertedProductionTStamp
- The point in time when the converter generated the value from the data structure received by the pluginsentToBsdbTStamp
- The point in time when the value has been sent to the BSDBreadFromBsdbTStamp
- The point in time when the value has been read from the BSDB
-
-
Method Details
-
updateValue
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
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
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
Update the additional properties- Parameters:
properties
- The new additional properties (can be null)- Returns:
- A new IASValue with updated properties
-
updateValidity
Build a new IASValue with the passed validity- Parameters:
validity
- the validity- Returns:
- The new IASValue with the updated validity
-
updateMonSysProdTime
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
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
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
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
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
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
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
-
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 valuemode
- The operational modeiasValidity
- The validityfullRunningId
- Full running IDvalueType
- 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 valuemode
- The operational modeiasValidity
- The validityfullRunningId
- Full running IDvalueType
- The type of the valuereadFromMonSysTStamp
- : the pont in time when the value has been read from the monitored systemproductionTStamp
- The point in time when the value has been produced by a plugin, a DASU or a core toolsentToConverterTStamp
- The point in time when the plugin sent the value to the converterreceivedFromPluginTStamp
- The point in time when the converter received the value from the pluginconvertedProductionTStamp
- The point in time when the converter generated the value from the data structure rceived by the pluginsentToBsdbTStamp
- The point in time when the value has been sent to the BSDBreadFromBsdbTStamp
- The point in time when the value has been read from the BSDBdependentsFullrunningIds
- The full running IDs of the dependent monitor points; can benull
properties
- Additional properties (can benull
)- Returns:
- A IasValue initialized with the passed parameters
-
hashCode
public int hashCode() -
getProperty
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
Build a new IASValue with a new key,value couple in the map of properties- Parameters:
key
- The keyvalue
- The value of the property- Returns:
-
equals
-