Class CategoryRoutedAlias

    • Field Detail

      • REQUIRED_ROUTER_PARAMS

        public static final Set<String> REQUIRED_ROUTER_PARAMS
        Parameters required for creating a category routed alias
      • OPTIONAL_ROUTER_PARAMS

        public static final Set<String> OPTIONAL_ROUTER_PARAMS
        Optional parameters for creating a category routed alias excluding parameters for collection creation.
    • Method Detail

      • updateParsedCollectionAliases

        public boolean updateParsedCollectionAliases​(ZkController zkController)
        Description copied from interface: RoutedAlias
        Ensure our parsed version of the alias collection list is up to date. If it was modified, return true. Note that this will return true if some other alias was modified or if properties were modified. These are spurious and the caller should be written to be tolerant of no material changes.
        Specified by:
        updateParsedCollectionAliases in interface RoutedAlias
      • getAliasName

        public String getAliasName()
        Description copied from interface: RoutedAlias
        The name of the alias. This name is used in place of a collection name for both queries and updates.
        Specified by:
        getAliasName in interface RoutedAlias
        Returns:
        The name of the Alias.
      • createCollectionsIfRequired

        public String createCollectionsIfRequired​(AddUpdateCommand cmd)
        Method to possibly create a collection. It's possible that the collection will already have been created either by a prior invocation in this thread or another thread. This method is idempotent, multiple invocations are harmless.
        Specified by:
        createCollectionsIfRequired in interface RoutedAlias
        Parameters:
        cmd - The command that might cause collection creation
        Returns:
        the collection to which the the update should be directed, possibly a newly created collection.
      • computeInitialCollectionName

        public String computeInitialCollectionName()
        Description copied from interface: RoutedAlias
        Create the initial collection for this RoutedAlias if applicable. Routed Aliases do not aggregate existing collections, instead they create collections on the fly. If the initial collection can be determined from initialization parameters it should be calculated here.
        Specified by:
        computeInitialCollectionName in interface RoutedAlias
        Returns:
        optional string of initial collection name