@Service(value="preDownloadPolicy#cache-failures") public class CachedFailuresPolicy extends AbstractPolicy implements PreDownloadPolicy
PreDownloadPolicy
to check if the requested url has failed before.Modifier and Type | Field and Description |
---|---|
static StandardOption |
NO
The NO policy setting means that the the existence of old failures is not checked.
|
static StandardOption |
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.
|
RESOURCE_BUNDLE
Constructor and Description |
---|
CachedFailuresPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
applyPolicy(PolicyOption policySetting,
Properties request,
StorageAsset localFile)
Apply the download policy.
|
PolicyOption |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
List<PolicyOption> |
getOptions()
Get the list of options for this policy.
|
getDescription, getName, getName, getOptionDescription, getOptionName, getOptionPrefix, getPolicyPrefix, setOptionPrefix, setPolicyPrefix
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getName, getName, getOptionDescription, getOptionName
public static final StandardOption NO
public static final StandardOption YES
public CachedFailuresPolicy()
public void applyPolicy(PolicyOption policySetting, Properties request, StorageAsset localFile) throws PolicyViolationException, PolicyConfigurationException
DownloadPolicy
applyPolicy
in interface DownloadPolicy
policySetting
- the policy setting.request
- the list of request properties that the policy might use.PolicyViolationException
- if the policy has been violated.PolicyConfigurationException
public PolicyOption getDefaultOption()
Policy
getDefaultOption
in interface Policy
public List<PolicyOption> getOptions()
Policy
getOptions
in interface Policy
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.