Skip to content

Commit

Permalink
Remove @Beta from various concurrent APIs.
Browse files Browse the repository at this point in the history
RELNOTES=`concurrent`: Remove `@Beta` from various `concurrent` APIs.
PiperOrigin-RevId: 531559865
  • Loading branch information
kluever authored and Google Java Core Libraries committed May 12, 2023
1 parent 74ad9b8 commit bbaf76a
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -142,7 +141,6 @@ protected void shutDown() throws Exception {}
* implementing {@code stopping}. Note, however, that {@code stopping} does not run at exactly the
* same times as {@code triggerShutdown}.
*/
@Beta
protected void triggerShutdown() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Strings;
import com.google.common.util.concurrent.internal.InternalFutureFailureAccess;
Expand Down Expand Up @@ -1071,7 +1070,6 @@ private static void complete(AbstractFuture<?> param, boolean callInterruptTask)
*
* @since 20.0
*/
@Beta
@ForOverride
protected void afterDone() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.util.concurrent;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -36,7 +35,6 @@
* @since 14.0
*/
@CheckReturnValue
@Beta
@GwtIncompatible
@J2ktIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import static com.google.common.util.concurrent.Service.State.TERMINATED;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.util.concurrent.Monitor.Guard;
Expand Down Expand Up @@ -239,7 +238,6 @@ protected AbstractService() {}
*
* @since 27.0
*/
@Beta
@ForOverride
protected void doCancelStart() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.base.Function;
Expand Down Expand Up @@ -294,7 +293,6 @@ boolean remove(K key, long value) {
*
* @since 20.0
*/
@Beta
@CanIgnoreReturnValue
public boolean removeIfZero(K key) {
return remove(key, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -48,7 +47,6 @@ private Callables() {}
*
* @since 20.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
public static <T extends @Nullable Object> AsyncCallable<T> asAsyncCallable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -160,7 +159,6 @@
* @author Darick Tong
* @since 13.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand All @@ -173,7 +171,6 @@ public class CycleDetectingLockFactory {
*
* @since 13.0
*/
@Beta
public interface Policy {

/**
Expand All @@ -193,7 +190,6 @@ public interface Policy {
*
* @since 13.0
*/
@Beta
public enum Policies implements Policy {
/**
* When potential deadlock is detected, this policy results in the throwing of the {@code
Expand Down Expand Up @@ -394,7 +390,6 @@ private static String getLockName(Enum<?> rank) {
* @param <E> The Enum type representing the explicit lock ordering.
* @since 13.0
*/
@Beta
public static final class WithExplicitOrdering<E extends Enum<E>>
extends CycleDetectingLockFactory {

Expand Down Expand Up @@ -534,7 +529,6 @@ private static class ExampleStackTrace extends IllegalStateException {
*
* @since 13.0
*/
@Beta
public static final class PotentialDeadlockException extends ExampleStackTrace {

private final ExampleStackTrace conflictingStackTrace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -36,7 +35,6 @@
* @author Jens Nyman
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import java.util.concurrent.ExecutionException;
Expand All @@ -39,7 +38,6 @@
* @author Sven Mawson
* @since 10.0 (replacing {@code Futures.makeListenable}, which existed in 1.0)
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

package com.google.common.util.concurrent;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;

/**
* Static utility methods pertaining to the {@link Runnable} interface.
*
* @since 16.0
*/
@Beta
@GwtCompatible
@ElementTypesAreNonnullByDefault
public final class Runnables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.collect.ObjectArrays;
Expand Down Expand Up @@ -46,7 +45,6 @@
* @author Jens Nyman
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package com.google.common.util.concurrent;

import com.google.common.annotations.Beta;

import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -32,7 +32,6 @@
* @author Jens Nyman
* @since 1.0
*/
@Beta
@DoNotMock("Use FakeTimeLimiter")
@J2ktIncompatible
@GwtIncompatible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -143,7 +142,6 @@ protected void shutDown() throws Exception {}
* implementing {@code stopping}. Note, however, that {@code stopping} does not run at exactly the
* same times as {@code triggerShutdown}.
*/
@Beta
protected void triggerShutdown() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Strings;
import com.google.common.util.concurrent.internal.InternalFutureFailureAccess;
Expand Down Expand Up @@ -1071,7 +1070,6 @@ private static void complete(AbstractFuture<?> param, boolean callInterruptTask)
*
* @since 20.0
*/
@Beta
@ForOverride
protected void afterDone() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package com.google.common.util.concurrent;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -36,7 +35,6 @@
* @since 14.0
*/
@CheckReturnValue
@Beta
@GwtIncompatible
@J2ktIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import static com.google.common.util.concurrent.Service.State.TERMINATED;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.util.concurrent.Monitor.Guard;
Expand Down Expand Up @@ -240,7 +239,6 @@ protected AbstractService() {}
*
* @since 27.0
*/
@Beta
@ForOverride
protected void doCancelStart() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand Down Expand Up @@ -242,7 +241,6 @@ boolean remove(K key, long value) {
*
* @since 20.0
*/
@Beta
@CanIgnoreReturnValue
public boolean removeIfZero(K key) {
return remove(key, 0);
Expand Down
2 changes: 0 additions & 2 deletions guava/src/com/google/common/util/concurrent/Callables.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
Expand Down Expand Up @@ -48,7 +47,6 @@ private Callables() {}
*
* @since 20.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
public static <T extends @Nullable Object> AsyncCallable<T> asAsyncCallable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -160,7 +159,6 @@
* @author Darick Tong
* @since 13.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand All @@ -173,7 +171,6 @@ public class CycleDetectingLockFactory {
*
* @since 13.0
*/
@Beta
public interface Policy {

/**
Expand All @@ -193,7 +190,6 @@ public interface Policy {
*
* @since 13.0
*/
@Beta
public enum Policies implements Policy {
/**
* When potential deadlock is detected, this policy results in the throwing of the {@code
Expand Down Expand Up @@ -394,7 +390,6 @@ private static String getLockName(Enum<?> rank) {
* @param <E> The Enum type representing the explicit lock ordering.
* @since 13.0
*/
@Beta
public static final class WithExplicitOrdering<E extends Enum<E>>
extends CycleDetectingLockFactory {

Expand Down Expand Up @@ -534,7 +529,6 @@ private static class ExampleStackTrace extends IllegalStateException {
*
* @since 13.0
*/
@Beta
public static final class PotentialDeadlockException extends ExampleStackTrace {

private final ExampleStackTrace conflictingStackTrace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.J2ktIncompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
Expand All @@ -36,7 +35,6 @@
* @author Jens Nyman
* @since 1.0
*/
@Beta
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Expand Down
Loading

0 comments on commit bbaf76a

Please sign in to comment.