Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* A virtual connection to a conceptual endpoint, to perform RPCs. A channel is free to have zero or
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ChannelLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* A Channel-specific logger provided by GRPC library to {@link LoadBalancer} implementations.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ClientInterceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* Interface for intercepting outgoing calls before they are dispatched by a {@link Channel}.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ClientStreamTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.base.MoreObjects;
import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* {@link StreamTracer} for the client-side.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/CompressorRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import static com.google.common.base.Preconditions.checkArgument;

import com.google.common.annotations.VisibleForTesting;
import com.google.errorprone.annotations.ThreadSafe;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Encloses classes related to the compression and decompression of messages.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/DecompressorRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.base.Joiner;
import com.google.errorprone.annotations.ThreadSafe;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Encloses classes related to the compression and decompression of messages.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/HandlerRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package io.grpc;

import com.google.errorprone.annotations.ThreadSafe;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Registry of services and their methods used by servers to dispatching incoming calls.
Expand Down
10 changes: 5 additions & 5 deletions api/src/main/java/io/grpc/LoadBalancer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.errorprone.annotations.ThreadSafe;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -32,7 +33,6 @@
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import javax.annotation.concurrent.ThreadSafe;

/**
* A pluggable component that receives resolved addresses from {@link NameResolver} and provides the
Expand Down Expand Up @@ -64,7 +64,7 @@
* allows implementations to schedule tasks to be run in the same Synchronization Context, with or
* without a delay, thus those tasks don't need to worry about synchronizing with the balancer
* methods.
*
*
* <p>However, the actual running thread may be the network thread, thus the following rules must be
* followed to prevent blocking or even dead-locking in a network:
*
Expand Down Expand Up @@ -417,7 +417,7 @@ public void handleSubchannelState(
*
* <p>This method should always return a constant value. It's not specified when this will be
* called.
*
*
* <p>Note that this method is only called when implementing {@code handleResolvedAddresses()}
* instead of {@code acceptResolvedAddresses()}.
*
Expand Down Expand Up @@ -640,7 +640,7 @@ private PickResult(
* stream is created at all in some cases.
* @since 1.3.0
*/
// TODO(shivaspeaks): Need to deprecate old APIs and create new ones,
// TODO(shivaspeaks): Need to deprecate old APIs and create new ones,
// per https://github.com/grpc/grpc-java/issues/12662.
public static PickResult withSubchannel(
Subchannel subchannel, @Nullable ClientStreamTracer.Factory streamTracerFactory) {
Expand Down Expand Up @@ -1332,7 +1332,7 @@ public MetricRecorder getMetricRecorder() {
}

/**
* A logical connection to a server, or a group of equivalent servers represented by an {@link
* A logical connection to a server, or a group of equivalent servers represented by an {@link
* EquivalentAddressGroup}.
*
* <p>It maintains at most one physical connection (aka transport) for sending new RPCs, while
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/LoadBalancerRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.annotations.VisibleForTesting;
import com.google.errorprone.annotations.ThreadSafe;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
Expand All @@ -30,7 +31,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Registry of {@link LoadBalancerProvider}s. The {@link #getDefaultRegistry default instance}
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ManagedChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.grpc;

import com.google.errorprone.annotations.ThreadSafe;
import java.util.concurrent.TimeUnit;
import javax.annotation.concurrent.ThreadSafe;

/**
* A {@link Channel} that provides lifecycle management.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ManagedChannelRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import java.net.SocketAddress;
import java.net.URI;
Expand All @@ -32,7 +33,6 @@
import java.util.ServiceLoader;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;

/**
* Registry of {@link ManagedChannelProvider}s. The {@link #getDefaultRegistry default instance}
Expand Down
6 changes: 3 additions & 3 deletions api/src/main/java/io/grpc/NameResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.base.Objects;
import com.google.errorprone.annotations.InlineMe;
import com.google.errorprone.annotations.ThreadSafe;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand All @@ -35,7 +36,6 @@
import java.util.concurrent.ScheduledExecutorService;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.ThreadSafe;

/**
* A pluggable component that resolves a target {@link URI} and return addresses to the caller.
Expand Down Expand Up @@ -78,7 +78,7 @@ public abstract class NameResolver {
* Starts the resolution. The method is not supposed to throw any exceptions. That might cause the
* Channel that the name resolver is serving to crash. Errors should be propagated
* through {@link Listener#onError}.
*
*
* <p>An instance may not be started more than once, by any overload of this method, even after
* an intervening call to {@link #shutdown}.
*
Expand Down Expand Up @@ -114,7 +114,7 @@ public void onResult(ResolutionResult resolutionResult) {
* Starts the resolution. The method is not supposed to throw any exceptions. That might cause the
* Channel that the name resolver is serving to crash. Errors should be propagated
* through {@link Listener2#onError}.
*
*
* <p>An instance may not be started more than once, by any overload of this method, even after
* an intervening call to {@link #shutdown}.
*
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/NameResolverRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import java.net.URI;
import java.util.ArrayList;
Expand All @@ -33,7 +34,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Registry of {@link NameResolverProvider}s. The {@link #getDefaultRegistry default instance}
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

package io.grpc;

import com.google.errorprone.annotations.ThreadSafe;
import java.io.IOException;
import java.net.SocketAddress;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.concurrent.ThreadSafe;

/**
* Server for listening for and dispatching incoming calls. It is not expected to be implemented by
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ServerCallHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* Interface to initiate processing of incoming remote calls. Advanced applications and generated
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ServerInterceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* Interface for intercepting incoming calls before they are dispatched by
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ServerRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import java.util.ArrayList;
import java.util.Collections;
Expand All @@ -27,7 +28,6 @@
import java.util.ServiceLoader;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;

/**
* Registry of {@link ServerProvider}s. The {@link #getDefaultRegistry default instance} loads
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/ServerStreamTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.grpc;

import com.google.errorprone.annotations.ThreadSafe;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Listens to events on a stream to collect metrics.
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/grpc/StreamTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.grpc;

import javax.annotation.concurrent.ThreadSafe;
import com.google.errorprone.annotations.ThreadSafe;

/**
* Listens to events on a stream to collect metrics.
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/io/grpc/SynchronizationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static com.google.common.base.Preconditions.checkState;
import static io.grpc.TimeUtils.convertToNanos;

import com.google.errorprone.annotations.ThreadSafe;
import java.lang.Thread.UncaughtExceptionHandler;
import java.time.Duration;
import java.util.Queue;
Expand All @@ -29,7 +30,6 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.concurrent.ThreadSafe;

/**
* A synchronization context is a queue of tasks that run in sequence. It offers following
Expand Down Expand Up @@ -262,4 +262,4 @@ public boolean isPending() {
return !(runnable.hasStarted || runnable.isCancelled);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.errorprone.annotations.CheckReturnValue;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import io.grpc.Attributes;
import io.grpc.CallOptions;
Expand Down Expand Up @@ -62,7 +63,6 @@
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/** Concrete client-side transport implementation. */
@ThreadSafe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import android.os.Parcel;
import android.os.RemoteException;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import io.grpc.Attributes;
import io.grpc.Grpc;
Expand All @@ -49,7 +50,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* A gRPC InternalServer which accepts connections via a host AndroidService.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Verify;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import io.grpc.Attributes;
import io.grpc.Grpc;
Expand All @@ -54,7 +55,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Base class for binder-based gRPC transport.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import androidx.annotation.AnyThread;
import androidx.annotation.MainThread;
import com.google.common.annotations.VisibleForTesting;
import com.google.errorprone.annotations.ThreadSafe;
import com.google.errorprone.annotations.concurrent.GuardedBy;
import io.grpc.Status;
import io.grpc.StatusException;
Expand All @@ -41,7 +42,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
* Manages an Android binding that's restricted to at most one connection to the remote Service.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/internal/AtomicBackoff.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package io.grpc.internal;

import com.google.common.base.Preconditions;
import com.google.errorprone.annotations.ThreadSafe;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.concurrent.ThreadSafe;

/**
* A {@code long} atomically updated due to errors caused by the value being too small.
Expand Down
Loading
Loading