Class FailurePolicy.BuilderBase<BUILDER extends FailurePolicy.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FailurePolicy>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER, PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER, PROTOTYPE>
- Direct Known Subclasses:
FailurePolicy.Builder
- Enclosing interface:
FailurePolicy
FailurePolicy.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final FailurePolicybuildPrototype(FailurePolicy.BuilderBase<?, ?> builder) Create a new prototype instance from a builder.Clear existing value of deadLetter.config()Configuration used to configure this instance.Update builder from configuration (node of this type).Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.deadLetter(DeadLetterConfig deadLetter) Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.deadLetter(Consumer<DeadLetterConfig.Builder> consumer) Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.deadLetter(Supplier<? extends DeadLetterConfig> supplier) Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.from(FailurePolicy prototype) Update this builder from an existing prototype instance.from(FailurePolicy.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Terminal disposition after delivery attempts are exhausted; dead letter requires a target channel.onExhausted(FailureDisposition onExhausted) Terminal disposition after delivery attempts are exhausted; dead letter requires a target channel.protected voidHandles providers and decorators.retry()Fault tolerance retry instance used for incoming delivery.Fault tolerance retry instance used for incoming delivery.retry(RetryConfig retry) Fault tolerance retry instance used for incoming delivery.retry(Consumer<RetryConfig.Builder> consumer) Fault tolerance retry instance used for incoming delivery.Fault tolerance retry instance used for incoming delivery.toString()protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends FailurePolicy.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends FailurePolicy>- Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
retry
Fault tolerance retry instance used for incoming delivery. When no retry is supplied, all default policies share one messaging retry instance withInteger.MAX_VALUEcalls, a one-second initial delay, factor-two exponential backoff, no jitter, a one-minute maximum delay, a practically unbounded timeout, and disabled instance metrics.An explicitly configured or programmatically supplied retry is complete and is used as supplied. Options omitted within an explicit retry use fault-tolerance defaults, without inheriting messaging defaults.
- Parameters:
retry- retry instance- Returns:
- updated builder instance
- See Also:
-
retry
Fault tolerance retry instance used for incoming delivery. When no retry is supplied, all default policies share one messaging retry instance withInteger.MAX_VALUEcalls, a one-second initial delay, factor-two exponential backoff, no jitter, a one-minute maximum delay, a practically unbounded timeout, and disabled instance metrics.An explicitly configured or programmatically supplied retry is complete and is used as supplied. Options omitted within an explicit retry use fault-tolerance defaults, without inheriting messaging defaults.
- Parameters:
retry- prototype of retry instance- Returns:
- updated builder instance
- See Also:
-
retry
Fault tolerance retry instance used for incoming delivery. When no retry is supplied, all default policies share one messaging retry instance withInteger.MAX_VALUEcalls, a one-second initial delay, factor-two exponential backoff, no jitter, a one-minute maximum delay, a practically unbounded timeout, and disabled instance metrics.An explicitly configured or programmatically supplied retry is complete and is used as supplied. Options omitted within an explicit retry use fault-tolerance defaults, without inheriting messaging defaults.
- Parameters:
consumer- consumer of builder of retry instance- Returns:
- updated builder instance
- See Also:
-
retry
Fault tolerance retry instance used for incoming delivery. When no retry is supplied, all default policies share one messaging retry instance withInteger.MAX_VALUEcalls, a one-second initial delay, factor-two exponential backoff, no jitter, a one-minute maximum delay, a practically unbounded timeout, and disabled instance metrics.An explicitly configured or programmatically supplied retry is complete and is used as supplied. Options omitted within an explicit retry use fault-tolerance defaults, without inheriting messaging defaults.
- Parameters:
supplier- supplier of retry instance- Returns:
- updated builder instance
- See Also:
-
onExhausted
Terminal disposition after delivery attempts are exhausted; dead letter requires a target channel. A pre-dispatch mapping failure reported throughConnectorDeliveryReservation.startFailed(MessageBatch, RuntimeException)orConnectorDeliveryReservation.tryStartFailed(MessageBatch, RuntimeException)is always treated as exhausted after its initial attempt because the runtime cannot repeat transport mapping.- Parameters:
onExhausted- terminal disposition- Returns:
- updated builder instance
- See Also:
-
clearDeadLetter
Clear existing value of deadLetter.- Returns:
- updated builder instance
- See Also:
-
deadLetter
Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.Runtime validation covers the logical channel graph. It cannot detect when distinct connector bindings resolve to the same transport destination, such as two Kafka channels configured with the same topic. A dead-letter target must not resolve back to the source connector.
- Parameters:
deadLetter- dead-letter configuration- Returns:
- updated builder instance
- See Also:
-
deadLetter
Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.Runtime validation covers the logical channel graph. It cannot detect when distinct connector bindings resolve to the same transport destination, such as two Kafka channels configured with the same topic. A dead-letter target must not resolve back to the source connector.
- Parameters:
consumer- consumer of builder of dead-letter configuration- Returns:
- updated builder instance
- See Also:
-
deadLetter
Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.Runtime validation covers the logical channel graph. It cannot detect when distinct connector bindings resolve to the same transport destination, such as two Kafka channels configured with the same topic. A dead-letter target must not resolve back to the source connector.
- Parameters:
supplier- supplier of dead-letter configuration- Returns:
- updated builder instance
- See Also:
-
retry
Fault tolerance retry instance used for incoming delivery. When no retry is supplied, all default policies share one messaging retry instance withInteger.MAX_VALUEcalls, a one-second initial delay, factor-two exponential backoff, no jitter, a one-minute maximum delay, a practically unbounded timeout, and disabled instance metrics.An explicitly configured or programmatically supplied retry is complete and is used as supplied. Options omitted within an explicit retry use fault-tolerance defaults, without inheriting messaging defaults.
- Returns:
- retry instance
-
onExhausted
Terminal disposition after delivery attempts are exhausted; dead letter requires a target channel. A pre-dispatch mapping failure reported throughConnectorDeliveryReservation.startFailed(MessageBatch, RuntimeException)orConnectorDeliveryReservation.tryStartFailed(MessageBatch, RuntimeException)is always treated as exhausted after its initial attempt because the runtime cannot repeat transport mapping.- Returns:
- terminal disposition
-
deadLetter
Dead-letter delivery configuration; required forFailureDisposition.DEAD_LETTERand invalid for other dispositions.Runtime validation covers the logical channel graph. It cannot detect when distinct connector bindings resolve to the same transport destination, such as two Kafka channels configured with the same topic. A dead-letter target must not resolve back to the source connector.
- Returns:
- dead-letter configuration
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
buildPrototype
Create a new prototype instance from a builder.- Parameters:
builder- builder used to create the prototype- Returns:
- new prototype instance
-
config
-