Package org.openspaces.archive
Interface ArchiveOperationHandler
- All Known Implementing Classes:
CassandraArchiveOperationHandler,MongoArchiveOperationHandler
public interface ArchiveOperationHandler
- Since:
- 9.1.1
- Author:
- Itai Frenkel
-
Method Summary
Modifier and TypeMethodDescriptionvoidWrites the specified objects to the external storagebooleanWhat 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.
-
Method Details
-
archive
Writes the specified objects to the external storage- Parameters:
objects- - one or more objects to write. If notsupportsBatchArchiving()then only one object is passed at a time.
-
supportsBatchArchiving
boolean supportsBatchArchiving()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.- Returns:
- true - if calling archive with more than one object false - means that calls to
archive(Object...)will contain only one object
-