Package org.eclipse.aether.internal.impl
Class DefaultUpdatePolicyAnalyzer
- java.lang.Object
-
- org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer
-
- All Implemented Interfaces:
UpdatePolicyAnalyzer
@Named public class DefaultUpdatePolicyAnalyzer extends java.lang.Object implements UpdatePolicyAnalyzer
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description DefaultUpdatePolicyAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEffectiveUpdatePolicy(RepositorySystemSession session, java.lang.String policy1, java.lang.String policy2)Returns the policy with the shorter update interval.private intgetMinutes(java.lang.String policy)booleanisUpdatedRequired(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 intordinalOfUpdatePolicy(java.lang.String policy)
-
-
-
Method Detail
-
getEffectiveUpdatePolicy
public java.lang.String getEffectiveUpdatePolicy(RepositorySystemSession session, java.lang.String policy1, java.lang.String policy2)
Description copied from interface:UpdatePolicyAnalyzerReturns the policy with the shorter update interval.- Specified by:
getEffectiveUpdatePolicyin interfaceUpdatePolicyAnalyzer- 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.
-
ordinalOfUpdatePolicy
private int ordinalOfUpdatePolicy(java.lang.String policy)
-
isUpdatedRequired
public boolean isUpdatedRequired(RepositorySystemSession session, long lastModified, java.lang.String policy)
Description copied from interface:UpdatePolicyAnalyzerDetermines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.- Specified by:
isUpdatedRequiredin interfaceUpdatePolicyAnalyzer- 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.
-
getMinutes
private int getMinutes(java.lang.String policy)
-
-