Class CompoundKey


  • @DefaultCoder(CompoundKeyCoder.class)
    public class CompoundKey
    extends Object
    Represents a compound key. A compound key is used to group flows into different dimensions. A compound key consists of a type that defines the used dimensions and a data class that contains the fields that determine the value of the key in these dimensions. The CompoundKeyData class can store the fields for all dimensions in order to reduce memory churn. Instances of the CompoundKeyData class can be shared between different compound key instances because the equality check and hashCode calculation does only consider the fields that correspond to the dimension that are used in the referencing key.
    • Method Detail

      • getOuterKey

        public CompoundKey getOuterKey()
        Build the parent, or "outer" key for the current key.
        Returns:
        the outer key, or null if no such key exists
      • cast

        public CompoundKey cast​(CompoundKeyType targetType)
        Cast this key into a key of the given type. It is required that the CompoundKeyData instance of this key has all fields set that are required by the target type.
      • groupedByKey

        public String groupedByKey()
      • populate

        public void populate​(FlowSummary flow)
      • populate

        public void populate​(org.opennms.nephron.cortex.TimeSeriesBuilder builder)
      • isCompleteConversationKey

        public boolean isCompleteConversationKey()
        Checks if this key includes the conversation dimension as its last part and that all required fields for the conversation dimension are set. This check is used to determine if a conversation is considered in the TopK aggregation for conversations. If the key of a conversation is not complete then it is not considered there.
      • hashCode

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

        public String asString()