Interface UpdatePolicyAnalyzer

  • All Known Implementing Classes:
    DefaultUpdatePolicyAnalyzer

    public interface UpdatePolicyAnalyzer
    Evaluates update policies.
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    Provisional:
    This type is provisional and can be changed, moved or removed without prior notice.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getEffectiveUpdatePolicy​(org.eclipse.aether.RepositorySystemSession session, java.lang.String policy1, java.lang.String policy2)
      Returns the policy with the shorter update interval.
      boolean isUpdatedRequired​(org.eclipse.aether.RepositorySystemSession session, long lastModified, java.lang.String policy)
      Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
    • Method Detail

      • getEffectiveUpdatePolicy

        java.lang.String getEffectiveUpdatePolicy​(org.eclipse.aether.RepositorySystemSession session,
                                                  java.lang.String policy1,
                                                  java.lang.String policy2)
        Returns the policy with the shorter update interval.
        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.
      • isUpdatedRequired

        boolean isUpdatedRequired​(org.eclipse.aether.RepositorySystemSession session,
                                  long lastModified,
                                  java.lang.String policy)
        Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
        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.