Interface QuarantineInterface<T extends PersistentData>
- Type Parameters:
T- a subclass of PersistentData
- All Known Subinterfaces:
StoreAndForwardEngine
public interface QuarantineInterface<T extends PersistentData>
The
QuarantineInterface provides a common API for handling quarantined data operations.-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteQuarantined(List<Integer> quarantinedDataIds) Deletes quarantined data from thisQuarantineInterfaceinstance.intReturns the total number of quarantined data within thisQuarantineInterfaceinstance.Returns the quarantined data info.retrieveQuarantined(List<Integer> quarantinedDataIds) Retrieves the desired quarantined data from thisQuarantineInterfaceinstance.voidretryQuarantined(List<Integer> quarantinedDataIds) Retries quarantined data such that data is attempted as good.voidstoreQuarantined(List<T> data, Exception failureReason) Stores quarantined data to thisQuarantineInterfaceinstance.
-
Method Details
-
storeQuarantined
Stores quarantined data to thisQuarantineInterfaceinstance.- Parameters:
data- a list of type T to be stored as quarantined.failureReason- an exception representing the reason for quarantining.- Throws:
Exception- if there is an error storing the data.
-
retryQuarantined
Retries quarantined data such that data is attempted as good.- Parameters:
quarantinedDataIds- a list of IDs for the data that is to be retried.
-
deleteQuarantined
Deletes quarantined data from thisQuarantineInterfaceinstance.- Parameters:
quarantinedDataIds- a list of IDs for the data that is to be deleted.
-
retrieveQuarantined
Retrieves the desired quarantined data from thisQuarantineInterfaceinstance.- Parameters:
quarantinedDataIds- a list of IDs for the data that is to be retrieved.- Returns:
- a list of type T representing the quarantined data.
- Throws:
Exception- if there is an error retrieving the data.
-
getQuarantinedDataInfo
List<QuarantinedDataInfo> getQuarantinedDataInfo()Returns the quarantined data info. Note this does not return the actual data.- Returns:
- a list of
QuarantinedDataInfoobjects describing the data that is currently quarantined.
-
getQuarantinedCount
int getQuarantinedCount()Returns the total number of quarantined data within thisQuarantineInterfaceinstance.- Returns:
- the number of items quarantined.
-