- All Known Implementing Classes:
public interface ArchiveOperationHandler
- Itai Frenkel
Writes the specified objects to the external storage
What happens when the archive operation receives a batch of objects to persist and throws an exception in the middle of the archiving?
void archive(Object... objects)
- Writes the specified objects to the external storage
objects - - one or more objects to write. If not
supportsBatchArchiving() then only one object is passed at a time.
- What happens when the archive operation receives a batch of objects to persist and throws an exception in the middle of the archiving?
The external archive container (assuming the exception is not swollen with an exception handler) will retry archiving all objects.
If the archive operation implementation is atomic (meaning that throwing an exception cancels all writes - all or nothing) then return true.
If the archive operation implementation is idempotent (meaning that writing the same objects twice has no visibility on the result) then return true.
Otherwise return false, so the archive method is called one object at a time.
Even when returning false, there is a possibility of an object being archived twice in case of a process fail-over.
- true - if calling archive with more than one object
false - means that calls to
archive(Object...) will contain only one object
Copyright © GigaSpaces.