@Service(value="preDownloadPolicy#cache-failures") public class CachedFailuresPolicy extends Object implements PreDownloadPolicy
PreDownloadPolicy to check if the requested url has failed before.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log |
static String |
NO
The NO policy setting means that the the existence of old failures is not checked.
|
private List<String> |
options |
private UrlFailureCache |
urlFailureCache |
static String |
YES
The YES policy setting means that the existence of old failures is checked, and will
prevent the request from being performed against the remote repo.
|
| Constructor and Description |
|---|
CachedFailuresPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyPolicy(String policySetting,
Properties request,
File localFile)
Apply the download policy.
|
String |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
String |
getName()
Get the display name for this policy.
|
List<String> |
getOptions()
Get the list of options for this policy.
|
private org.slf4j.Logger log
public static final String NO
public static final String YES
@Inject private UrlFailureCache urlFailureCache
public CachedFailuresPolicy()
public void applyPolicy(String policySetting, Properties request, File localFile) throws PolicyViolationException, PolicyConfigurationException
DownloadPolicyapplyPolicy in interface DownloadPolicypolicySetting - the policy setting.request - the list of request properties that the policy might use.PolicyViolationException - if the policy has been violated.PolicyConfigurationExceptionpublic String getDefaultOption()
PolicygetDefaultOption in interface Policypublic String getName()
Policypublic List<String> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.