docs: public static void writeXid(ByteBuf buf, Xid xid) {
        if (xid instanceof RemoteXid) {
           ((RemoteXid) xid).writeTo(buf);
        } else {
           ByteBufUtil.writeSignedVInt(buf, xid.getFormatId());
           writeArray(buf, xid.getGlobalTransactionId());
           writeArray(buf, xid.getBranchQualifier());
        }
     }