Class CorrelationId
java.lang.Object
dk.cloudcreate.essentials.types.CharSequenceType<CorrelationId>
dk.cloudcreate.essentials.components.foundation.types.CorrelationId
- All Implemented Interfaces:
dk.cloudcreate.essentials.types.Identifier,dk.cloudcreate.essentials.types.SingleValueType<CharSequence,,CorrelationId> Serializable,CharSequence,Comparable<CorrelationId>
public class CorrelationId
extends dk.cloudcreate.essentials.types.CharSequenceType<CorrelationId>
implements dk.cloudcreate.essentials.types.Identifier
A correlation id is used to link multiple Messages or Events together in a distributed system
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CorrelationIdof(CharSequence value) static Optional<CorrelationId>optionalFrom(CharSequence value) Converts a non-nullvalueto anOptional.of(Object)with argumentCorrelationId, otherwise it returns anOptional.empty()static CorrelationIdrandom()Methods inherited from class dk.cloudcreate.essentials.types.CharSequenceType
charAt, chars, codePointAt, codePointBefore, codePointCount, codePoints, compareTo, compareTo, compareToIgnoreCase, contains, containsIgnoreCase, contentEquals, contentEquals, endsWith, equals, equalsIgnoreCase, getBytes, getBytes, getBytes, getChars, hashCode, indexOf, indexOf, indexOf, indexOf, isEmpty, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, length, offsetByCodePoints, startsWith, startsWith, subSequence, substring, substring, toCharArray, toString, valueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.cloudcreate.essentials.types.SingleValueType
getValue
-
Constructor Details
-
CorrelationId
-
-
Method Details
-
optionalFrom
Converts a non-nullvalueto anOptional.of(Object)with argumentCorrelationId, otherwise it returns anOptional.empty()- Parameters:
value- the optional value- Returns:
- an
Optionalwith anCorrelationIddepending on whethervalueis non-null, otherwise anOptional.empty()is returned
-
of
-
random
-