@Override
    public Pipeline addLast(HandlerInvoker invoker, Handler... handlers) {
        if (handlers == null) {
            throw new NullPointerException("handlers");
        }

        for (Handler h: handlers) {
            if (h == null) {
                break;
            }
            addLast(invoker, null, h);
        }

        return this;
    }
Most of the code references the pipeline design of
<a href="https://github.com/netty/netty">Netty</a>.

@author jiachun.fjc
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/pipeline/DefaultPipeline.java