Record Class AutoCacheFactory.OnErrorContinue<E extends Throwable>
java.lang.Object
java.lang.Record
io.github.pellse.assembler.caching.AutoCacheFactory.OnErrorContinue<E>
- All Implemented Interfaces:
AutoCacheFactory.ErrorHandler
- Enclosing interface:
AutoCacheFactory
public static record AutoCacheFactory.OnErrorContinue<E extends Throwable>(Predicate<E extends Throwable> errorPredicate, BiConsumer<Throwable,Object> errorConsumer)
extends Record
implements AutoCacheFactory.ErrorHandler
-
Constructor Summary
ConstructorsConstructorDescriptionOnErrorContinue(Predicate<E> errorPredicate, BiConsumer<Throwable, Object> errorConsumer) Creates an instance of aOnErrorContinuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorConsumerrecord component.Returns the value of theerrorPredicaterecord component.final inthashCode()Returns a hash code value for this object.static AutoCacheFactory.OnErrorContinue<?> static AutoCacheFactory.OnErrorContinue<?> onErrorContinue(BiConsumer<Throwable, Object> errorConsumer) static AutoCacheFactory.OnErrorContinue<?> onErrorContinue(Consumer<Throwable> errorConsumer) static <E extends Throwable>
AutoCacheFactory.OnErrorContinue<E> onErrorContinue(Predicate<E> errorPredicate, BiConsumer<Throwable, Object> errorConsumer) <T> Function<reactor.core.publisher.Flux<T>, reactor.core.publisher.Flux<T>> final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OnErrorContinue
Creates an instance of aOnErrorContinuerecord class.- Parameters:
errorPredicate- the value for theerrorPredicaterecord componenterrorConsumer- the value for theerrorConsumerrecord component
-
-
Method Details
-
onErrorContinue
-
onErrorContinue
public static AutoCacheFactory.OnErrorContinue<?> onErrorContinue(Consumer<Throwable> errorConsumer) -
onErrorContinue
public static AutoCacheFactory.OnErrorContinue<?> onErrorContinue(BiConsumer<Throwable, Object> errorConsumer) -
onErrorContinue
public static <E extends Throwable> AutoCacheFactory.OnErrorContinue<E> onErrorContinue(Predicate<E> errorPredicate, BiConsumer<Throwable, Object> errorConsumer) -
toFluxErrorHandler
public <T> Function<reactor.core.publisher.Flux<T>,reactor.core.publisher.Flux<T>> toFluxErrorHandler()- Specified by:
toFluxErrorHandlerin interfaceAutoCacheFactory.ErrorHandler
-
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. -
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. -
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). -
errorPredicate
Returns the value of theerrorPredicaterecord component.- Returns:
- the value of the
errorPredicaterecord component
-
errorConsumer
Returns the value of theerrorConsumerrecord component.- Returns:
- the value of the
errorConsumerrecord component
-