Class CorrelationId
- java.lang.Object
-
- dk.cloudcreate.essentials.types.CharSequenceType<CorrelationId>
-
- dk.cloudcreate.essentials.components.foundation.types.CorrelationId
-
- All Implemented Interfaces:
Identifier,SingleValueType<CharSequence,CorrelationId>,Serializable,CharSequence,Comparable<CorrelationId>
public class CorrelationId extends CharSequenceType<CorrelationId> implements Identifier
A correlation id is used to link multiple Messages or Events together in a distributed system- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CorrelationId(CharSequence value)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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, value
-
-
-
-
Constructor Detail
-
CorrelationId
public CorrelationId(CharSequence value)
-
-
Method Detail
-
optionalFrom
public static Optional<CorrelationId> optionalFrom(CharSequence value)
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
public static CorrelationId of(CharSequence value)
-
random
public static CorrelationId random()
-
-