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 TypeMethodDescriptionvoid
deleteQuarantined
(List<Integer> quarantinedDataIds) Deletes quarantined data from thisQuarantineInterface
instance.int
Returns the total number of quarantined data within thisQuarantineInterface
instance.Returns the quarantined data info.retrieveQuarantined
(List<Integer> quarantinedDataIds) Retrieves the desired quarantined data from thisQuarantineInterface
instance.void
retryQuarantined
(List<Integer> quarantinedDataIds) Retries quarantined data such that data is attempted as good.void
storeQuarantined
(List<T> data, Exception failureReason) Stores quarantined data to thisQuarantineInterface
instance.
-
Method Details
-
storeQuarantined
Stores quarantined data to thisQuarantineInterface
instance.- 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 thisQuarantineInterface
instance.- Parameters:
quarantinedDataIds
- a list of IDs for the data that is to be deleted.
-
retrieveQuarantined
Retrieves the desired quarantined data from thisQuarantineInterface
instance.- 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
QuarantinedDataInfo
objects describing the data that is currently quarantined.
-
getQuarantinedCount
int getQuarantinedCount()Returns the total number of quarantined data within thisQuarantineInterface
instance.- Returns:
- the number of items quarantined.
-