|
32 | 32 | import javax.annotation.Nullable; |
33 | 33 | import javax.annotation.concurrent.Immutable; |
34 | 34 | import javax.annotation.concurrent.NotThreadSafe; |
35 | | -import javax.annotation.concurrent.ThreadSafe; |
36 | 35 |
|
37 | 36 | /** |
38 | 37 | * A pluggable component that receives resolved addresses from {@link NameResolver} and provides the |
|
64 | 63 | * allows implementations to schedule tasks to be run in the same Synchronization Context, with or |
65 | 64 | * without a delay, thus those tasks don't need to worry about synchronizing with the balancer |
66 | 65 | * methods. |
67 | | - * |
| 66 | + * |
68 | 67 | * <p>However, the actual running thread may be the network thread, thus the following rules must be |
69 | 68 | * followed to prevent blocking or even dead-locking in a network: |
70 | 69 | * |
@@ -417,7 +416,7 @@ public void handleSubchannelState( |
417 | 416 | * |
418 | 417 | * <p>This method should always return a constant value. It's not specified when this will be |
419 | 418 | * called. |
420 | | - * |
| 419 | + * |
421 | 420 | * <p>Note that this method is only called when implementing {@code handleResolvedAddresses()} |
422 | 421 | * instead of {@code acceptResolvedAddresses()}. |
423 | 422 | * |
@@ -450,7 +449,6 @@ public void requestConnection() {} |
450 | 449 | * |
451 | 450 | * @since 1.2.0 |
452 | 451 | */ |
453 | | - @ThreadSafe |
454 | 452 | @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") |
455 | 453 | public abstract static class SubchannelPicker { |
456 | 454 | /** |
@@ -640,7 +638,7 @@ private PickResult( |
640 | 638 | * stream is created at all in some cases. |
641 | 639 | * @since 1.3.0 |
642 | 640 | */ |
643 | | - // TODO(shivaspeaks): Need to deprecate old APIs and create new ones, |
| 641 | + // TODO(shivaspeaks): Need to deprecate old APIs and create new ones, |
644 | 642 | // per https://github.com/grpc/grpc-java/issues/12662. |
645 | 643 | public static PickResult withSubchannel( |
646 | 644 | Subchannel subchannel, @Nullable ClientStreamTracer.Factory streamTracerFactory) { |
@@ -1030,9 +1028,10 @@ public String toString() { |
1030 | 1028 | /** |
1031 | 1029 | * Provides essentials for LoadBalancer implementations. |
1032 | 1030 | * |
| 1031 | + * <p>This class is thread-safe. |
| 1032 | + * |
1033 | 1033 | * @since 1.2.0 |
1034 | 1034 | */ |
1035 | | - @ThreadSafe |
1036 | 1035 | @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") |
1037 | 1036 | public abstract static class Helper { |
1038 | 1037 | /** |
@@ -1332,7 +1331,7 @@ public MetricRecorder getMetricRecorder() { |
1332 | 1331 | } |
1333 | 1332 |
|
1334 | 1333 | /** |
1335 | | - * A logical connection to a server, or a group of equivalent servers represented by an {@link |
| 1334 | + * A logical connection to a server, or a group of equivalent servers represented by an {@link |
1336 | 1335 | * EquivalentAddressGroup}. |
1337 | 1336 | * |
1338 | 1337 | * <p>It maintains at most one physical connection (aka transport) for sending new RPCs, while |
@@ -1551,9 +1550,10 @@ public interface SubchannelStateListener { |
1551 | 1550 | /** |
1552 | 1551 | * Factory to create {@link LoadBalancer} instance. |
1553 | 1552 | * |
| 1553 | + * <p>This class is thread-safe. |
| 1554 | + * |
1554 | 1555 | * @since 1.2.0 |
1555 | 1556 | */ |
1556 | | - @ThreadSafe |
1557 | 1557 | @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771") |
1558 | 1558 | public abstract static class Factory { |
1559 | 1559 | /** |
|
0 commit comments