diff options
Diffstat (limited to 'guava/src/com/google/common/util/concurrent/FluentFuture.java')
-rw-r--r-- | guava/src/com/google/common/util/concurrent/FluentFuture.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/guava/src/com/google/common/util/concurrent/FluentFuture.java b/guava/src/com/google/common/util/concurrent/FluentFuture.java index b47e67927..9dbbca37f 100644 --- a/guava/src/com/google/common/util/concurrent/FluentFuture.java +++ b/guava/src/com/google/common/util/concurrent/FluentFuture.java @@ -17,9 +17,9 @@ package com.google.common.util.concurrent; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.util.concurrent.Internal.toNanosSaturated; -import com.google.common.annotations.Beta; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; +import com.google.common.annotations.J2ktIncompatible; import com.google.common.base.Function; import com.google.errorprone.annotations.CanIgnoreReturnValue; import com.google.errorprone.annotations.DoNotMock; @@ -184,8 +184,8 @@ public abstract class FluentFuture<V extends @Nullable Object> * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final <X extends Throwable> FluentFuture<V> catching( Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) { return (FluentFuture<V>) Futures.catching(this, exceptionType, fallback, executor); @@ -249,8 +249,8 @@ public abstract class FluentFuture<V extends @Nullable Object> * {@code get()} throws a different kind of exception, that exception itself. * @param executor the executor that runs {@code fallback} if the input fails */ + @J2ktIncompatible @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") - @Beta public final <X extends Throwable> FluentFuture<V> catchingAsync( Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) { return (FluentFuture<V>) Futures.catchingAsync(this, exceptionType, fallback, executor); @@ -266,8 +266,8 @@ public abstract class FluentFuture<V extends @Nullable Object> * @param scheduledExecutor The executor service to enforce the timeout. * @since 28.0 */ + @J2ktIncompatible @GwtIncompatible // ScheduledExecutorService - @Beta public final FluentFuture<V> withTimeout( Duration timeout, ScheduledExecutorService scheduledExecutor) { return withTimeout(toNanosSaturated(timeout), TimeUnit.NANOSECONDS, scheduledExecutor); @@ -283,9 +283,9 @@ public abstract class FluentFuture<V extends @Nullable Object> * @param unit the time unit of the time parameter * @param scheduledExecutor The executor service to enforce the timeout. */ + @J2ktIncompatible @GwtIncompatible // ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration - @Beta public final FluentFuture<V> withTimeout( long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) { return (FluentFuture<V>) Futures.withTimeout(this, timeout, unit, scheduledExecutor); @@ -330,7 +330,6 @@ public abstract class FluentFuture<V extends @Nullable Object> * @return A future that holds result of the function (if the input succeeded) or the original * input's failure (if not) */ - @Beta public final <T extends @Nullable Object> FluentFuture<T> transformAsync( AsyncFunction<? super V, T> function, Executor executor) { return (FluentFuture<T>) Futures.transformAsync(this, function, executor); @@ -368,7 +367,6 @@ public abstract class FluentFuture<V extends @Nullable Object> * @param executor Executor to run the function in. * @return A future that holds result of the transformation. */ - @Beta public final <T extends @Nullable Object> FluentFuture<T> transform( Function<? super V, T> function, Executor executor) { return (FluentFuture<T>) Futures.transform(this, function, executor); |