private DataType getOrCreateType(int id) {
            if (typesByIdx.containsKey(id)) {
                return typesByIdx.get(id);
            }
            var factory = factoryByIdx.remove(id);
            if (factory != null) {
                DataType type = factory.get();
                return addNewType(id, type);
            }
            throw new IllegalArgumentException("No type or factory found for idx: "+id);
        }
One-shot configuration; should be called on a newly constructed manager
document/src/main/java/com/yahoo/document/DocumentTypeManagerConfigurer.java