Class TimeRoutedAlias

    • Method Detail

      • computeInitialCollectionName

        public String computeInitialCollectionName()
      • parseInstantFromCollectionName

        public static Instant parseInstantFromCollectionName​(String aliasName,
                                                             String collection)
      • formatCollectionNameFromInstant

        public static String formatCollectionNameFromInstant​(String aliasName,
                                                             Instant timestamp)
      • updateParsedCollectionAliases

        public boolean updateParsedCollectionAliases​(ZkStateReader zkStateReader,
                                                     boolean contextualize)
        Description copied from class: 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 class RoutedAlias
      • getAliasName

        public String getAliasName()
        Description copied from class: 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 class RoutedAlias
        Returns:
        The name of the Alias.
      • getRouteField

        public String getRouteField()
      • getIntervalMath

        public String getIntervalMath()
      • getMaxFutureMs

        public long getMaxFutureMs()
      • getPreemptiveCreateWindow

        public String getPreemptiveCreateWindow()
      • getAutoDeleteAgeMath

        public String getAutoDeleteAgeMath()
      • getTimeZone

        public TimeZone getTimeZone()
      • getHeadCollectionIfOrdered

        protected String getHeadCollectionIfOrdered​(AddUpdateCommand cmd)
        Description copied from class: RoutedAlias
        Calculate the head collection (i.e. the most recent one for a TRA) if this routed alias has an implicit order, or if the collection is unordered return the appropriate collection name for the value in the current document. This method should never return null.
        Specified by:
        getHeadCollectionIfOrdered in class RoutedAlias
      • findCandidateGivenValue

        public org.apache.solr.cloud.api.collections.RoutedAlias.CandidateCollection findCandidateGivenValue​(AddUpdateCommand cmd)
        Given the route key, finds the correct collection and an indication of any collection that needs to be created. Future docs will potentially cause creation of a collection that does not yet exist. This method presumes that the doc time stamp has already been checked to not exceed maxFutureMs
        Throws:
        SolrException - if the doc is too old to be stored in the TRA
      • calculateActions

        protected List<RoutedAlias.Action> calculateActions​(String targetCol)
        Description copied from class: RoutedAlias
        Determine the combination of adds/deletes implied by the arrival of a document destined for the specified collection.
        Specified by:
        calculateActions in class RoutedAlias
        Parameters:
        targetCol - the collection for which a document is destined.
        Returns:
        A list of actions across the DRA.