@@ -81,10 +81,6 @@ public ClientStreamTracer newClientStreamTracer(StreamInfo info, Metadata header
8181 }
8282 }
8383
84- /** An abstract class for internal use only. */
85- @ Internal
86- public abstract static class InternalLimitedInfoFactory extends Factory {}
87-
8884 /**
8985 * Information about a stream.
9086 *
@@ -95,32 +91,17 @@ public abstract static class InternalLimitedInfoFactory extends Factory {}
9591 */
9692 @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/2861" )
9793 public static final class StreamInfo {
98- private final Attributes transportAttrs ;
9994 private final CallOptions callOptions ;
10095 private final int previousAttempts ;
10196 private final boolean isTransparentRetry ;
10297
10398 StreamInfo (
104- Attributes transportAttrs , CallOptions callOptions , int previousAttempts ,
105- boolean isTransparentRetry ) {
106- this .transportAttrs = checkNotNull (transportAttrs , "transportAttrs" );
99+ CallOptions callOptions , int previousAttempts , boolean isTransparentRetry ) {
107100 this .callOptions = checkNotNull (callOptions , "callOptions" );
108101 this .previousAttempts = previousAttempts ;
109102 this .isTransparentRetry = isTransparentRetry ;
110103 }
111104
112- /**
113- * Returns the attributes of the transport that this stream was created on.
114- *
115- * @deprecated Use {@link ClientStreamTracer#streamCreated(Attributes, Metadata)} to handle
116- * the transport Attributes instead.
117- */
118- @ Deprecated
119- @ Grpc .TransportAttr
120- public Attributes getTransportAttrs () {
121- return transportAttrs ;
122- }
123-
124105 /**
125106 * Returns the effective CallOptions of the call.
126107 */
@@ -154,7 +135,6 @@ public boolean isTransparentRetry() {
154135 public Builder toBuilder () {
155136 return new Builder ()
156137 .setCallOptions (callOptions )
157- .setTransportAttrs (transportAttrs )
158138 .setPreviousAttempts (previousAttempts )
159139 .setIsTransparentRetry (isTransparentRetry );
160140 }
@@ -171,7 +151,6 @@ public static Builder newBuilder() {
171151 @ Override
172152 public String toString () {
173153 return MoreObjects .toStringHelper (this )
174- .add ("transportAttrs" , transportAttrs )
175154 .add ("callOptions" , callOptions )
176155 .add ("previousAttempts" , previousAttempts )
177156 .add ("isTransparentRetry" , isTransparentRetry )
@@ -184,27 +163,13 @@ public String toString() {
184163 * @since 1.21.0
185164 */
186165 public static final class Builder {
187- private Attributes transportAttrs = Attributes .EMPTY ;
188166 private CallOptions callOptions = CallOptions .DEFAULT ;
189167 private int previousAttempts ;
190168 private boolean isTransparentRetry ;
191169
192170 Builder () {
193171 }
194172
195- /**
196- * Sets the attributes of the transport that this stream was created on. This field is
197- * optional.
198- *
199- * @deprecated Use {@link ClientStreamTracer#streamCreated(Attributes, Metadata)} to handle
200- * the transport Attributes instead.
201- */
202- @ Deprecated
203- public Builder setTransportAttrs (@ Grpc .TransportAttr Attributes transportAttrs ) {
204- this .transportAttrs = checkNotNull (transportAttrs , "transportAttrs cannot be null" );
205- return this ;
206- }
207-
208173 /**
209174 * Sets the effective CallOptions of the call. This field is optional.
210175 */
@@ -237,7 +202,7 @@ public Builder setIsTransparentRetry(boolean isTransparentRetry) {
237202 * Builds a new StreamInfo.
238203 */
239204 public StreamInfo build () {
240- return new StreamInfo (transportAttrs , callOptions , previousAttempts , isTransparentRetry );
205+ return new StreamInfo (callOptions , previousAttempts , isTransparentRetry );
241206 }
242207 }
243208 }
0 commit comments