void putFactory(VersionSpecification version, int type, RoutableFactory factory) {
        VersionMap versionMap = factoryTypes.get(type);
        if (versionMap == null) {
            versionMap = new VersionMap();

            factoryTypes.put(type, versionMap);
        }
        if (versionMap.putFactory(version, factory)) {
            cache.clear();
        }
    }
Registers a routable factory for a given version and routable type.

@param version The version specification that the given factory supports.
@param type    The routable type that the given factory supports.
@param factory The routable factory to register.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/RoutableRepository.java