@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 | NOThe NO policy setting means that the the existence of old failures is not checked. | 
| static StandardOption | YESThe 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, setPolicyPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getName, getName, getOptionDescription, getOptionNamepublic static final StandardOption NO
public static final StandardOption YES
public CachedFailuresPolicy()
public void applyPolicy(PolicyOption policySetting, Properties request, StorageAsset 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 PolicyOption getDefaultOption()
PolicygetDefaultOption in interface Policypublic List<PolicyOption> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.