All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.loc.repository.bagit.transfer.FetchFailStrategy Maven / Gradle / Ivy

Go to download

The BAGIT LIBRARY is a software library intended to support the creation, manipulation, and validation of bags. Its current version is 0.97. It is version aware with the earliest supported version being 0.93.

There is a newer version: 5.2.0
Show newest version
package gov.loc.repository.bagit.transfer;

import gov.loc.repository.bagit.FetchTxt;

/**
 * Represents a strategy for failing a fetch, based on some
 * implementation-defined criteria.  Implementors must
 * return a {@link FetchFailureAction} value that determines
 * the action that the caller should take in response to
 * the registered failure.
 * 
 * 

Implementations of this interface must be * thread-safe.

* *

Fetch failures are used by the the * {@link BagFetcher#setFetchFailStrategy(FetchFailStrategy) setFetchFailStrategy} * method of the BagFetcher. Some common strategies are * the {@link StandardFailStrategies#ALWAYS_CONTINUE ALWAYS_CONTINUE}, * {@link StandardFailStrategies#ALWAYS_RETRY ALWAYS_RETRY}, * and {@link StandardFailStrategies#FAIL_FAST FAIL_FAST} strategies. * A more complex strategy might involve the * {@link ThresholdFailStrategy}.

* * @version $id$ * @see FetchFailureAction * @see StandardFailStrategies * @see ThresholdFailStrategy * @see BagFetcher */ public interface FetchFailStrategy { FetchFailureAction registerFailure(FetchTxt.FilenameSizeUrl fetchLine, Object context); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy