@Named public class DefaultUpdatePolicyAnalyzer extends Object implements UpdatePolicyAnalyzer, org.eclipse.aether.spi.locator.Service
Constructor and Description |
---|
DefaultUpdatePolicyAnalyzer() |
Modifier and Type | Method and Description |
---|---|
String |
getEffectiveUpdatePolicy(org.eclipse.aether.RepositorySystemSession session,
String policy1,
String policy2)
Returns the policy with the shorter update interval.
|
void |
initService(org.eclipse.aether.spi.locator.ServiceLocator locator) |
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.
|
DefaultUpdatePolicyAnalyzer |
setLoggerFactory(org.eclipse.aether.spi.log.LoggerFactory loggerFactory) |
public DefaultUpdatePolicyAnalyzer()
public void initService(org.eclipse.aether.spi.locator.ServiceLocator locator)
initService
in interface org.eclipse.aether.spi.locator.Service
public DefaultUpdatePolicyAnalyzer setLoggerFactory(org.eclipse.aether.spi.log.LoggerFactory loggerFactory)
public String getEffectiveUpdatePolicy(org.eclipse.aether.RepositorySystemSession session, String policy1, String policy2)
UpdatePolicyAnalyzer
getEffectiveUpdatePolicy
in interface UpdatePolicyAnalyzer
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
.public boolean isUpdatedRequired(org.eclipse.aether.RepositorySystemSession session, long lastModified, String policy)
UpdatePolicyAnalyzer
isUpdatedRequired
in interface UpdatePolicyAnalyzer
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
.true
if the specified timestamp is older than acceptable by the update policy, false
otherwise.Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.