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 aOnErrorContinue
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theerrorConsumer
record component.Returns the value of theerrorPredicate
record component.final int
hashCode()
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 String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
OnErrorContinue
Creates an instance of aOnErrorContinue
record class.- Parameters:
errorPredicate
- the value for theerrorPredicate
record componenterrorConsumer
- the value for theerrorConsumer
record 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:
toFluxErrorHandler
in 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 theerrorPredicate
record component.- Returns:
- the value of the
errorPredicate
record component
-
errorConsumer
Returns the value of theerrorConsumer
record component.- Returns:
- the value of the
errorConsumer
record component
-