GigaSpaces XAP 9.1 API

org.openspaces.archive
Interface ArchiveOperationHandler

All Known Implementing Classes:
CassandraArchiveOperationHandler

public interface ArchiveOperationHandler

Since:
9.1.1
Author:
Itai Frenkel

Method Summary
 void archive(Object... objects)
          Writes the specified objects to the external storage
 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?
 

Method Detail

archive

void archive(Object... objects)
Writes the specified objects to the external storage

Parameters:
objects - - one or more objects to write. If not supportsBatchArchiving() 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

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.