Interface UpdatePolicyAnalyzer
- All Known Implementing Classes:
DefaultUpdatePolicyAnalyzer
public interface UpdatePolicyAnalyzer
Evaluates update policies.
-
Method Summary
Modifier and TypeMethodDescriptiongetEffectiveUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, String policy2) Returns the policy with the shorter update interval.getStrongerUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, String policy2) Returns the policy with the longer update interval, i.e.booleanisUpdatedRequired(org.eclipse.aether.RepositorySystemSession session, long lastModified, String policy) Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
-
Method Details
-
getEffectiveUpdatePolicy
String getEffectiveUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, String policy2) Returns the policy with the shorter update interval.- Parameters:
session- The repository system session during which the request is made, must not benull.policy1- A policy to compare, may benull.policy2- A policy to compare, may benull.- Returns:
- The policy with the shorter update interval.
-
getStrongerUpdatePolicy
String getStrongerUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, String policy2) Returns the policy with the longer update interval, i.e. the one that checks for updates least often.- Parameters:
session- The repository system session during which the request is made, must not benull.policy1- A policy to compare, may benull.policy2- A policy to compare, may benull.- Returns:
- The policy with the longer update interval.
- Since:
- 2.0.25
-
isUpdatedRequired
boolean isUpdatedRequired(org.eclipse.aether.RepositorySystemSession session, long lastModified, 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 benull.lastModified- The timestamp to check against the update policy.policy- The update policy, may benull.- Returns:
trueif the specified timestamp is older than acceptable by the update policy,falseotherwise.
-