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).
  • Constructor Details

    • FilterPreserving

      public FilterPreserving(BatchInterceptor delegate)
      Creates an instance of a FilterPreserving record class.
      Parameters:
      delegate - the value for the delegate record component
  • Method Details

    • describeConsumerFilter

      public io.fluxzero.common.api.tracking.ConsumerFilter describeConsumerFilter(io.fluxzero.common.api.tracking.ConsumerFilter downstream)
      Description copied from interface: BatchInterceptor
      Describes 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 return downstream only 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:
      describeConsumerFilter in interface BatchInterceptor
    • intercept

      public Consumer<io.fluxzero.common.api.tracking.MessageBatch> intercept(Consumer<io.fluxzero.common.api.tracking.MessageBatch> consumer, Tracker tracker)
      Description copied from interface: BatchInterceptor
      Intercepts the given batch message consumer and returns a decorated version to be invoked by the tracker.
      Specified by:
      intercept in interface BatchInterceptor
      Parameters:
      consumer - the original consumer that processes the MessageBatch
      tracker - the tracker invoking this interceptor
      Returns:
      a wrapped consumer with additional behavior
    • shutdown

      public void shutdown(Tracker tracker)
      Description copied from interface: BatchInterceptor
      Optional lifecycle callback for cleanup when the tracker shuts down. Default is a no-op.
      Specified by:
      shutdown in interface BatchInterceptor
      Parameters:
      tracker - the tracker being shut down
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • delegate

      public BatchInterceptor delegate()
      Returns the value of the delegate record component.
      Returns:
      the value of the delegate record component