db4o 4.0

com.db4o.ext
Interface Db4oReplication


public interface Db4oReplication

db4o replication interface.


Method Summary
 void commit()
          commits the replication task.
 void rollback()
          ends a replication task without committing any changes.
 void setConflictHandler(Db4oCallback conflictHandler)
          registers a callback handler to be notified on replication conflicts.
 

Method Detail

commit

public void commit()
commits the replication task.

Call this method after replication is completed to write all changes back to the database files. This method will store information about the replication task to the database file to allow incremental replication for future replication runs.


rollback

public void rollback()
ends a replication task without committing any changes.


setConflictHandler

public void setConflictHandler(Db4oCallback conflictHandler)
registers a callback handler to be notified on replication conflicts.

Conflicts occur, if an object has been modified in both the origin and destination ObjectContainer since the last time replication was run between the two ObjectContainers.

Upon a conflict the Db4oCallback.callback(Object) method will be called in the conflict handler and a Db4oReplicationConflict object will be passed as a parameter.

Parameters:
conflictHandler - the object to be called upon conflicts.

db4o 4.0