@Service(value="downloadErrorPolicy#propagate-errors-on-update") public class PropagateErrorsOnUpdateDownloadPolicy extends AbstractPolicy implements DownloadErrorPolicy
Modifier and Type | Field and Description |
---|---|
static DownloadErrorOption |
ALWAYS
Signifies any error should cause a failure whether the artifact is already present or not.
|
static DownloadErrorOption |
NOT_PRESENT
Signifies any error should cause a failure only if the artifact is not already present.
|
RESOURCE_BUNDLE
Constructor and Description |
---|
PropagateErrorsOnUpdateDownloadPolicy() |
Modifier and Type | Method and Description |
---|---|
boolean |
applyPolicy(PolicyOption policySetting,
Properties request,
StorageAsset localFile,
Exception exception,
Map<String,Exception> previousExceptions)
Apply the download error 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 DownloadErrorOption ALWAYS
public static final DownloadErrorOption NOT_PRESENT
public PropagateErrorsOnUpdateDownloadPolicy()
public boolean applyPolicy(PolicyOption policySetting, Properties request, StorageAsset localFile, Exception exception, Map<String,Exception> previousExceptions) throws PolicyConfigurationException
DownloadErrorPolicy
applyPolicy
in interface DownloadErrorPolicy
policySetting
- the policy setting.request
- the list of request properties that the policy might use.exception
- the exception that triggered the errorpreviousExceptions
- any previously triggered exceptionsPolicyConfigurationException
- if the policy is improperly configuredpublic 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.