Package com.seeq.link.sdk.utilities
Class ParsedCapsule
java.lang.Object
com.seeq.link.sdk.utilities.ParsedCapsule
A
Capsule
with parsed property values.
This is necessary to deduplicate and serialize Capsules.
Most methods in this class were ported from datasource-proxy and seriesdata.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
A parsed Capsule property value, with UOM and possibly invalid. -
Constructor Summary
ConstructorsConstructorDescriptionParsedCapsule
(long startNanos, long endNanos, com.google.common.collect.ImmutableMap<String, ParsedCapsule.ParsedPropertyValue> properties) -
Method Summary
Modifier and TypeMethodDescriptionThis is similar to Capsule.enforceCapsulePropertyMetadata, except we always remove properties with different units from the Condition metadata.static ParsedCapsule
parse
(Capsule capsule, UnitParser unitParser)
-
Constructor Details
-
ParsedCapsule
public ParsedCapsule(long startNanos, long endNanos, com.google.common.collect.ImmutableMap<String, ParsedCapsule.ParsedPropertyValue> properties)
-
-
Method Details
-
parse
-
enforceCapsulePropertyMetadata
This is similar to Capsule.enforceCapsulePropertyMetadata, except we always remove properties with different units from the Condition metadata. This was decided because "it is a tenet of our system that we should not combine metadata and data, therefore, if units change, it requires a reindex". Enforce the given on this capsule: - Filter out any capsule properties that aren't given in the metadata - Filter out any capsule properties that haveParsedCapsule.ParsedPropertyValue.INVALID
values - Remove capsule properties having different units from the ones given in the metadata The above rules are enforced case-insensitively with respect to property names.
-