@@ -109,18 +109,18 @@ public void destroy() {
109109 * @param invokers invoker candidates
110110 * @param selected exclude selected invokers or not
111111 * @return the invoker which will final to do invoke.
112- * @throws RpcException
112+ * @throws RpcException exception
113113 */
114114 protected Invoker <T > select (LoadBalance loadbalance , Invocation invocation ,
115- List <Invoker <T >> invokers , List <Invoker <T >> selected ) throws RpcException {
115+ List <Invoker <T >> invokers , List <Invoker <T >> selected ) throws RpcException {
116116
117117 if (CollectionUtils .isEmpty (invokers )) {
118118 return null ;
119119 }
120120 String methodName = invocation == null ? StringUtils .EMPTY : invocation .getMethodName ();
121121
122122 boolean sticky = invokers .get (0 ).getUrl ()
123- .getMethodParameter (methodName , Constants .CLUSTER_STICKY_KEY , Constants .DEFAULT_CLUSTER_STICKY );
123+ .getMethodParameter (methodName , Constants .CLUSTER_STICKY_KEY , Constants .DEFAULT_CLUSTER_STICKY );
124124
125125 //ignore overloaded method
126126 if (stickyInvoker != null && !invokers .contains (stickyInvoker )) {
@@ -142,7 +142,7 @@ protected Invoker<T> select(LoadBalance loadbalance, Invocation invocation,
142142 }
143143
144144 private Invoker <T > doSelect (LoadBalance loadbalance , Invocation invocation ,
145- List <Invoker <T >> invokers , List <Invoker <T >> selected ) throws RpcException {
145+ List <Invoker <T >> invokers , List <Invoker <T >> selected ) throws RpcException {
146146
147147 if (CollectionUtils .isEmpty (invokers )) {
148148 return null ;
@@ -180,19 +180,20 @@ private Invoker<T> doSelect(LoadBalance loadbalance, Invocation invocation,
180180 * Reselect, use invokers not in `selected` first, if all invokers are in `selected`,
181181 * just pick an available one using loadbalance policy.
182182 *
183- * @param loadbalance
184- * @param invocation
185- * @param invokers
186- * @param selected
187- * @return
188- * @throws RpcException
183+ * @param loadbalance load balance policy
184+ * @param invocation invocation
185+ * @param invokers invoker candidates
186+ * @param selected exclude selected invokers or not
187+ * @param availablecheck check invoker available if true
188+ * @return the reselect result to do invoke
189+ * @throws RpcException exception
189190 */
190191 private Invoker <T > reselect (LoadBalance loadbalance , Invocation invocation ,
191- List <Invoker <T >> invokers , List <Invoker <T >> selected , boolean availablecheck ) throws RpcException {
192+ List <Invoker <T >> invokers , List <Invoker <T >> selected , boolean availablecheck ) throws RpcException {
192193
193194 //Allocating one in advance, this list is certain to be used.
194195 List <Invoker <T >> reselectInvokers = new ArrayList <>(
195- invokers .size () > 1 ? (invokers .size () - 1 ) : invokers .size ());
196+ invokers .size () > 1 ? (invokers .size () - 1 ) : invokers .size ());
196197
197198 // First, try picking a invoker not in `selected`.
198199 for (Invoker <T > invoker : invokers ) {
@@ -242,7 +243,6 @@ public Result invoke(final Invocation invocation) throws RpcException {
242243 }
243244
244245 protected void checkWhetherDestroyed () {
245-
246246 if (destroyed .get ()) {
247247 throw new RpcException ("Rpc cluster invoker for " + getInterface () + " on consumer " + NetUtils .getLocalHost ()
248248 + " use dubbo version " + Version .getVersion ()
0 commit comments