Class CorrelationId
java.lang.Object
com.thecoderscorner.menu.remote.protocol.CorrelationId
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new correlation ID that is relatively uniqueCorrelationId(String correlationAsText) Creates a correlation id with the specified value, for existing correlation ids -
Method Summary
-
Field Details
-
EMPTY_CORRELATION
-
-
Constructor Details
-
CorrelationId
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 Details
-
toString
Gets the value of the ID as a hex string -
getUnderlyingId
public long getUnderlyingId()Gets the underlying ID.- Returns:
-
equals
-
hashCode
public int hashCode()
-