void piggyback(SessionProtocol desiredProtocol, SerializationFormat serializationFormat, PoolKey key,
                       ChannelAcquisitionFuture childPromise,
                       ClientConnectionTimingsBuilder timingsBuilder) {

            // Add to the pending handler list if not complete yet.
            if (!isDone()) {
                final Consumer<PooledChannel> handler =
                        pch -> handlePiggyback(desiredProtocol, serializationFormat, key,
                                               childPromise, timingsBuilder, pch);

                if (pendingPiggybackHandlers == null) {
                    // The 1st handler
                    pendingPiggybackHandlers = handler;
                    return;
                }

                if (!(pendingPiggybackHandlers instanceof List)) {
                    // The 2nd handler
                    @SuppressWarnings("unchecked")
                    final Consumer<PooledChannel> firstHandler =
                            (Consumer<PooledChannel>) pendingPiggybackHandlers;
                    final List<Consumer<PooledChannel>> list = new ArrayList<>();
                    list.add(firstHandler);
                    list.add(handler);
                    pendingPiggybackHandlers = list;
                    return;
                }

                // The 3rd or later handler
                @SuppressWarnings("unchecked")
                final List<Consumer<PooledChannel>> list =
                        (List<Consumer<PooledChannel>>) pendingPiggybackHandlers;
                list.add(handler);
                return;
            }

            // Handle immediately if complete already.
            handlePiggyback(desiredProtocol, serializationFormat, key, childPromise, timingsBuilder,
                            isCompletedExceptionally() ? null : getNow(null));
        }
A {@code Consumer<PooledChannel>} if only 1 handler.
A {@code List<Consumer<PooledChannel>>} if there are 2+ handlers.
core/src/main/java/com/linecorp/armeria/client/HttpChannelPool.java