public class OptionalFailure<T> extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
static <T> OptionalFailure<T> |
createFrom(CheckedSupplier<T> valueSupplier) |
boolean |
equals(Object obj) |
T |
get() |
Throwable |
getFailureCause() |
T |
getUnchecked() |
int |
hashCode() |
boolean |
isFailure() |
static <T> OptionalFailure<T> |
of(T value) |
static <T> OptionalFailure<T> |
ofFailure(Throwable failureCause) |
String |
toString() |
public static <T> OptionalFailure<T> of(T value)
public static <T> OptionalFailure<T> ofFailure(Throwable failureCause)
public static <T> OptionalFailure<T> createFrom(CheckedSupplier<T> valueSupplier)
OptionalFailure returned by valueSupplier or wrapped failure if
valueSupplier has thrown an Exception.public T get() throws FlinkException
FlinkException with failureCause.FlinkExceptionpublic T getUnchecked() throws FlinkRuntimeException
get() but throws a FlinkRuntimeException.FlinkRuntimeExceptionpublic Throwable getFailureCause()
public boolean isFailure()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.