@@ -526,12 +526,12 @@ static class Entry {
526526 * start.
527527 */
528528 @ VisibleForTesting final AtomicInteger outstandingUnaryRpcs = new AtomicInteger (0 );
529+
529530 @ VisibleForTesting final AtomicInteger outstandingStreamingRpcs = new AtomicInteger (0 );
530531
531532 private final AtomicInteger maxOutstandingUnaryRpcs = new AtomicInteger ();
532533 private final AtomicInteger maxOutstandingStreamingRpcs = new AtomicInteger ();
533534
534-
535535 /** Queue storing the last 5 minutes of probe results */
536536 @ VisibleForTesting
537537 final ConcurrentLinkedQueue <ProbeResult > probeHistory = new ConcurrentLinkedQueue <>();
@@ -557,6 +557,7 @@ static class Entry {
557557 ManagedChannel getManagedChannel () {
558558 return this .channel ;
559559 }
560+
560561 @ VisibleForTesting
561562 int totalOutstandingRpcs () {
562563 return outstandingUnaryRpcs .get () + outstandingStreamingRpcs .get ();
@@ -579,7 +580,8 @@ int getAndResetMaxOutstanding() {
579580 @ VisibleForTesting
580581 boolean retain (boolean isStreaming ) {
581582 AtomicInteger counter = isStreaming ? outstandingStreamingRpcs : outstandingUnaryRpcs ;
582- AtomicInteger maxCounter = isStreaming ? maxOutstandingStreamingRpcs : maxOutstandingUnaryRpcs ;
583+ AtomicInteger maxCounter =
584+ isStreaming ? maxOutstandingStreamingRpcs : maxOutstandingUnaryRpcs ;
583585 int currentOutstanding = counter .incrementAndGet ();
584586 maxCounter .accumulateAndGet (currentOutstanding , Math ::max );
585587 // abort if the channel is closing
@@ -601,13 +603,12 @@ void release(boolean isStreaming) {
601603 LOG .log (Level .WARNING , "Bug! Reference count is negative (" + newCount + ")!" );
602604 }
603605
604- // Must check toalOutstandingRpcs after shutdownRequested (in reverse order of retain()) to ensure
606+ // Must check toalOutstandingRpcs after shutdownRequested (in reverse order of retain()) to
607+ // ensure
605608 // mutual exclusion.
606609 if (shutdownRequested .get () && totalOutstandingRpcs () == 0 ) {
607610 shutdown ();
608611 }
609-
610-
611612 }
612613
613614 /**
@@ -647,7 +648,8 @@ public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> newCall(
647648 MethodDescriptor <RequestT , ResponseT > methodDescriptor , CallOptions callOptions ) {
648649 boolean isStreaming = methodDescriptor .getType () != MethodDescriptor .MethodType .UNARY ;
649650 Entry entry = getRetainedEntry (index , isStreaming );
650- return new ReleasingClientCall <>(entry .channel .newCall (methodDescriptor , callOptions ), entry , isStreaming );
651+ return new ReleasingClientCall <>(
652+ entry .channel .newCall (methodDescriptor , callOptions ), entry , isStreaming );
651653 }
652654 }
653655
0 commit comments