Record Class BatchInterceptor.FilterPreserving
java.lang.Object
java.lang.Record
io.fluxzero.sdk.tracking.BatchInterceptor.FilterPreserving
- All Implemented Interfaces:
BatchInterceptor
- Enclosing interface:
BatchInterceptor
public static record BatchInterceptor.FilterPreserving(BatchInterceptor delegate)
extends Record
implements BatchInterceptor
Explicit selection-preserving wrapper; use
BatchInterceptor.preservingConsumerFilter(BatchInterceptor).-
Nested Class Summary
Nested classes/interfaces inherited from interface BatchInterceptor
BatchInterceptor.FilterPreserving -
Field Summary
Fields inherited from interface BatchInterceptor
defaultInterceptors -
Constructor Summary
ConstructorsConstructorDescriptionFilterPreserving(BatchInterceptor delegate) Creates an instance of aFilterPreservingrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()Returns the value of thedelegaterecord component.io.fluxzero.common.api.tracking.ConsumerFilterdescribeConsumerFilter(io.fluxzero.common.api.tracking.ConsumerFilter downstream) Describes serialized inputs needed by this interceptor and its downstream consumer.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Consumer<io.fluxzero.common.api.tracking.MessageBatch> Intercepts the given batch message consumer and returns a decorated version to be invoked by the tracker.voidOptional lifecycle callback for cleanup when the tracker shuts down.final StringtoString()Returns a string representation of this record class.Methods inherited from interface BatchInterceptor
andThen
-
Constructor Details
-
FilterPreserving
Creates an instance of aFilterPreservingrecord class.- Parameters:
delegate- the value for thedelegaterecord component
-
-
Method Details
-
describeConsumerFilter
public io.fluxzero.common.api.tracking.ConsumerFilter describeConsumerFilter(io.fluxzero.common.api.tracking.ConsumerFilter downstream) Description copied from interface:BatchInterceptorDescribes serialized inputs needed by this interceptor and its downstream consumer. The default is unrestricted because interceptors can transform messages or require inputs that no handler accepts. Implementations may returndownstreamonly when excluded inputs are irrelevant to their behavior and they never transform an excluded input into one the downstream filter admits. Custom inverse projections describe the input side of a transformation; this method runs after serializer/upcaster projection.- Specified by:
describeConsumerFilterin interfaceBatchInterceptor
-
intercept
public Consumer<io.fluxzero.common.api.tracking.MessageBatch> intercept(Consumer<io.fluxzero.common.api.tracking.MessageBatch> consumer, Tracker tracker) Description copied from interface:BatchInterceptorIntercepts the given batch message consumer and returns a decorated version to be invoked by the tracker.- Specified by:
interceptin interfaceBatchInterceptor- Parameters:
consumer- the original consumer that processes theMessageBatchtracker- the tracker invoking this interceptor- Returns:
- a wrapped consumer with additional behavior
-
shutdown
Description copied from interface:BatchInterceptorOptional lifecycle callback for cleanup when the tracker shuts down. Default is a no-op.- Specified by:
shutdownin interfaceBatchInterceptor- Parameters:
tracker- the tracker being shut down
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-