Class AWSExceptionHandler
- java.lang.Object
-
- org.apache.flink.connector.aws.sink.throwable.AWSExceptionHandler
-
@Internal public class AWSExceptionHandler extends Object
Class to provide improved semantics overFatalExceptionClassifier.isFatal(Throwable, Consumer).FatalExceptionClassifier.isFatal(Throwable, Consumer)returns `false` for a fatal exception and `true` for a non-fatal exception.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconsumeIfFatal(Throwable t, java.util.function.Consumer<Exception> consumer)Passes a givenThrowablet to a givenConsumerconsumer if the throwable is fatal.static AWSExceptionHandlerwithClassifier(org.apache.flink.connector.base.sink.throwable.FatalExceptionClassifier classifier)
-
-
-
Method Detail
-
withClassifier
public static AWSExceptionHandler withClassifier(org.apache.flink.connector.base.sink.throwable.FatalExceptionClassifier classifier)
-
consumeIfFatal
public boolean consumeIfFatal(Throwable t, java.util.function.Consumer<Exception> consumer)
Passes a givenThrowablet to a givenConsumerconsumer if the throwable is fatal. Returns `true` if theThrowablehas been passed to theConsumer(i.e. it is fatal) and `false` otherwise.- Parameters:
t- aThrowableconsumer- aConsumerto call if the passed throwable t is fatal.- Returns:
- `true` if t is fatal, `false` otherwise.
-
-