default <V2> Callback<V2> chainStaging(Callback<V2> chained) {
        return new Callback<V2>() {
            @Override
            public void recordStage(Stage stage) {
                Callback.this.recordStage(stage);
            }

            @Override
            public void onCompletion(Throwable error, V2 result) {
                chained.onCompletion(error, result);
            }
        };
    }
Invoked upon completion of the operation.

@param error the error that caused the operation to fail, or null if no error occurred
@param result the return value, or null if the operation failed
connect/runtime/src/main/java/org/apache/kafka/connect/util/Callback.java