Class DefaultUpdatePolicyAnalyzer

java.lang.Object
org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer
All Implemented Interfaces:
UpdatePolicyAnalyzer

@Singleton @Named public class DefaultUpdatePolicyAnalyzer extends Object implements UpdatePolicyAnalyzer
  • Constructor Details

  • Method Details

    • getEffectiveUpdatePolicy

      public String getEffectiveUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, 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.
    • isUpdatedRequired

      public boolean isUpdatedRequired(org.eclipse.aether.RepositorySystemSession session, long lastModified, 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.