public final Serializer serializeWithId(Serializer buf) {
        buf.putInt(null, getClassId());
        return serialize(buf);
    }
Serializes the content of this class into the given byte buffer. This method serializes its own identifier into
the buffer before invoking the {@link #serialize(Serializer)} method.

@param buf The buffer to serialize to.
@return The buffer argument, to allow chaining.
vespajlib/src/main/java/com/yahoo/vespa/objects/Identifiable.java