private static void handlePendingRegistrations(ConcurrentMap<MeterIdPrefix, Object> map,
                                                   RegistrationState registrationState) {
        for (;;) {
            @SuppressWarnings("unchecked")
            final PendingRegistration<Object> pendingRegistration =
                    (PendingRegistration<Object>) registrationState.pendingRegistrations.poll();

            if (pendingRegistration == null) {
                break;
            }

            register(map, registrationState, pendingRegistration.registry, pendingRegistration.idPrefix,
                     pendingRegistration.type, pendingRegistration.factory
            );
        }
    }
Associates a newly-created object with the specified {@link MeterIdPrefix} or returns an existing one if
exists already.

@param idPrefix the {@link MeterIdPrefix} of the object
@param type the type of the object created by {@code factory}
@param factory a factory that creates an object of {@code type}, to be associated with {@code idPrefix}

@return the object of {@code type}, which may or may not be created by {@code factory}
@throws IllegalStateException if there is already an object of different class associated
                              for the same {@link MeterIdPrefix}
core/src/main/java/com/linecorp/armeria/internal/common/metric/MicrometerUtil.java