Class CorrelationId


  • public class CorrelationId
    extends java.lang.Object
    A correlation ID that allows events sent from the client or server to be linked via this ID. Calling the constructor with no parameters creates a new correlation. These are only unique for a time frame of hours to days. They should not be used for any purpose requiring persistence that could extend beyond that.
    • Constructor Summary

      Constructors 
      Constructor Description
      CorrelationId()
      Creates a new correlation ID that is relatively unique
      CorrelationId​(java.lang.String correlationAsText)
      Creates a correlation id with the specified value, for existing correlation ids
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      long getUnderlyingId()
      Gets the underlying ID.
      int hashCode()  
      java.lang.String toString()
      Gets the value of the ID as a hex string
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EMPTY_CORRELATION

        public static final CorrelationId EMPTY_CORRELATION
    • Constructor Detail

      • CorrelationId

        public CorrelationId​(java.lang.String correlationAsText)
        Creates a correlation id with the specified value, for existing correlation ids
        Parameters:
        correlationAsText - the id to be represented
      • CorrelationId

        public CorrelationId()
        Creates a new correlation ID that is relatively unique
    • Method Detail

      • toString

        public java.lang.String toString()
        Gets the value of the ID as a hex string
        Overrides:
        toString in class java.lang.Object
        Returns:
        the correlation ID as a hex string.
      • getUnderlyingId

        public long getUnderlyingId()
        Gets the underlying ID.
        Returns:
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object