T
- the type of the supported event payloadsK
- the type of the extracted propertypublic static final class PropertySequencingPolicy.Builder<T,K> extends Object
PropertySequencingPolicy
.
Upon initialization of this builder, the following fields are defaulted:
fallbackSequencingPolicy
defaults to an exception raising sequencing policy.
payloadClass
which defines the supported type of event message payload.propertyExtractor
which is applied to the payload and extract the sequence identifier.fallbackSequencingPolicy
which defines the behaviour in case of an unsupported event payload.Modifier and Type | Method and Description |
---|---|
PropertySequencingPolicy<T,K> |
build()
Initializes a
PropertySequencingPolicy as specified through this Builder. |
PropertySequencingPolicy.Builder<T,K> |
fallbackSequencingPolicy(SequencingPolicy<EventMessage> fallbackSequencingPolicy)
Defines the fallback sequencing policy, the sequencing policy which is applied if the event message payload
is not of a supported type.
|
PropertySequencingPolicy.Builder<T,K> |
propertyExtractor(Function<T,K> propertyExtractor)
Defines the property extractor, a function which is applied to the event message payload to extract the
sequence identifier.
|
PropertySequencingPolicy.Builder<T,K> |
propertyName(String propertyName)
Defines the name of the property to be extracted as sequence identifier.
|
public PropertySequencingPolicy.Builder<T,K> propertyExtractor(Function<T,K> propertyExtractor)
propertyExtractor
- The new property extractor.public PropertySequencingPolicy.Builder<T,K> propertyName(String propertyName)
propertyExtractor(Function)
.propertyName
- The new name of the property to be extracted.public PropertySequencingPolicy.Builder<T,K> fallbackSequencingPolicy(SequencingPolicy<EventMessage> fallbackSequencingPolicy)
fallbackSequencingPolicy
- The new fallback sequencing policy.public PropertySequencingPolicy<T,K> build()
PropertySequencingPolicy
as specified through this Builder.PropertySequencingPolicy
as specified through this BuilderCopyright © 2010–2022. All rights reserved.