Skip to content
Success

Changes

Summary

  1. Allow data and metadata update de-duplication (commit: d56f449) (details)
  2. Further improvements to timestamp mapping (commit: 508355c) (details)
Commit d56f449967ab2d893f97a1736a3d8eb79c23148a by timothyjward
Allow data and metadata update de-duplication

This commit adds a DuplicateAction to the pushed updates, which determines the behaviour when the pushed update contains a duplicate value or metadata value. A duplicate value is determined by object equality, or == if one value is null. The default for resource values is that duplicates updates are applied, updating the timestamp and generating a update event. The default for metadata values is that duplicate updates are ignored, avoiding timestamp updates and update events. The reason for this difference is that repeated data readings can often give the same value, but this is a new reading. In general metadata values do not change, and so duplicates aren't interesting.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: d56f449)
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/AnnotationMapping.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/impl/SetValueCommand.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/impl/SetMetadataCommand.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Data.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/extract/impl/GenericDtoExtractorTest.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Service.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/dto/impl/AbstractUpdateDto.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Resource.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/nexus/ModelNexus.java
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/push/dto/GenericDto.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/extract/impl/CustomBaseValueDtoExtractorTest.java
The file was addedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/DuplicateAction.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/GenericDtoDataExtractor.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/integration/DataUpdateServiceTest.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Metadata.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Provider.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/extract/impl/AnnotationBasedDtoExtractorTest.java
Commit 508355c944be9bead0063f388f4b31de34007644 by timothyjward
Further improvements to timestamp mapping
(commit: 508355c)
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/AnnotationMapping.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/Timestamp.java