@@ -156,15 +156,16 @@ public String toString() {
156156 private int recursionCount ;
157157
158158 /**
159- * Handles newly resolved server groups and metadata attributes from name resolution system.
160- * {@code servers} contained in {@link EquivalentAddressGroup} should be considered equivalent
161- * but may be flattened into a single list if needed.
162- *
163- * <p>Implementations should not modify the given {@code servers}.
159+ * Handles newly resolved addresses and metadata attributes from name resolution system.
160+ * Addresses in {@link EquivalentAddressGroup} should be considered equivalent but may be
161+ * flattened into a single list if needed.
164162 *
165163 * @param resolvedAddresses the resolved server addresses, attributes, and config.
166164 * @since 1.21.0
165+ *
166+ * @deprecated Use instead {@link #acceptResolvedAddresses(ResolvedAddresses)}
167167 */
168+ @ Deprecated
168169 public void handleResolvedAddresses (ResolvedAddresses resolvedAddresses ) {
169170 if (recursionCount ++ == 0 ) {
170171 // Note that the information about the addresses actually being accepted will be lost
@@ -179,12 +180,10 @@ public void handleResolvedAddresses(ResolvedAddresses resolvedAddresses) {
179180 * EquivalentAddressGroup} addresses should be considered equivalent but may be flattened into a
180181 * single list if needed.
181182 *
182- * <p>Implementations can choose to reject the given addresses by returning {@code false}.
183- *
184- * <p>Implementations should not modify the given {@code addresses}.
183+ * @param resolvedAddresses the resolved server addresses, attributes, and config
184+ * @return {@code Status.OK} if the resolved addresses were accepted, otherwise an error to report
185+ * to the name resolver
185186 *
186- * @param resolvedAddresses the resolved server addresses, attributes, and config.
187- * @return {@code true} if the resolved addresses were accepted. {@code false} if rejected.
188187 * @since 1.49.0
189188 */
190189 public Status acceptResolvedAddresses (ResolvedAddresses resolvedAddresses ) {
@@ -418,7 +417,16 @@ public void handleSubchannelState(
418417 *
419418 * <p>This method should always return a constant value. It's not specified when this will be
420419 * called.
420+ *
421+ * <p>Note that this method is only called when implementing {@code handleResolvedAddresses()}
422+ * instead of {@code acceptResolvedAddresses()}.
423+ *
424+ * @deprecated Instead of overwriting this and {@code handleResolvedAddresses()}, only
425+ * overwrite {@code acceptResolvedAddresses()} which indicates if the addresses provided
426+ * by the name resolver are acceptable with the {@code boolean} return value.
421427 */
428+ @ Deprecated
429+ @ SuppressWarnings ("InlineMeSuggester" )
422430 public boolean canHandleEmptyAddressListFromNameResolution () {
423431 return false ;
424432 }
0 commit comments