Class DefaultUpdatePolicyAnalyzer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger LOGGER  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getEffectiveUpdatePolicy​(RepositorySystemSession session, java.lang.String policy1, java.lang.String policy2)
      Returns the policy with the shorter update interval.
      private int getMinutes​(java.lang.String policy)  
      boolean isUpdatedRequired​(RepositorySystemSession session, long lastModified, java.lang.String policy)
      Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
      private int ordinalOfUpdatePolicy​(java.lang.String policy)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • DefaultUpdatePolicyAnalyzer

        public DefaultUpdatePolicyAnalyzer()
    • Method Detail

      • getEffectiveUpdatePolicy

        public java.lang.String getEffectiveUpdatePolicy​(RepositorySystemSession session,
                                                         java.lang.String policy1,
                                                         java.lang.String policy2)
        Description copied from interface: UpdatePolicyAnalyzer
        Returns the policy with the shorter update interval.
        Specified by:
        getEffectiveUpdatePolicy in interface UpdatePolicyAnalyzer
        Parameters:
        session - The repository system session during which the request is made, must not be null.
        policy1 - A policy to compare, may be null.
        policy2 - A policy to compare, may be null.
        Returns:
        The policy with the shorter update interval.
      • ordinalOfUpdatePolicy

        private int ordinalOfUpdatePolicy​(java.lang.String policy)
      • isUpdatedRequired

        public boolean isUpdatedRequired​(RepositorySystemSession session,
                                         long lastModified,
                                         java.lang.String policy)
        Description copied from interface: UpdatePolicyAnalyzer
        Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
        Specified by:
        isUpdatedRequired in interface UpdatePolicyAnalyzer
        Parameters:
        session - The repository system session during which the check is made, must not be null.
        lastModified - The timestamp to check against the update policy.
        policy - The update policy, may be null.
        Returns:
        true if the specified timestamp is older than acceptable by the update policy, false otherwise.
      • getMinutes

        private int getMinutes​(java.lang.String policy)