@Override
    protected int getEnumId(Class<?> clazz)
    {
        final RuntimeEnumIO reio = getRuntimeEnumIO(clazz);

        // wait till everything is completely set
        int id;
        while (0 == (id = reio.id))
            LockSupport.parkNanos(1);

        return (id << 5) | CID_ENUM;
    }
Register a {@link Delegate} and assign an id.
<p>
Delegate ids start at 1.
protostuff-runtime-registry/src/main/java/io/protostuff/runtime/IncrementalIdStrategy.java