db4o 4.0

com.db4o.ext
Interface Db4oReplicationConflict


public interface Db4oReplicationConflict

will be passed to the Db4oCallback registered in a Db4oReplication with #setConflictHandler() in case an object that is replicated was changed in both ObjectContainers


Method Summary
 ObjectContainer destination()
          returns the destination ObjectContainer.
 java.lang.Object destinationObject()
          gets the object that caused the conflict from the destination ObjectContainer.
 ObjectContainer source()
          returns the source ObjectContainer.
 java.lang.Object sourceObject()
          gets the object that caused the conflict from the source ObjectContainer.
 void useDestination()
          instructs the replication process to store the object from the destination ObjectContainer to both ObjectContainers.
 void useSource()
          instructs the replication process to store the object from the source ObjectContainer to both ObjectContainers.
 

Method Detail

destination

public ObjectContainer destination()
returns the destination ObjectContainer.

Returns:
the destination ObjectContainer

destinationObject

public java.lang.Object destinationObject()
gets the object that caused the conflict from the destination ObjectContainer.

Returns:
the object as it exists in the destination ObjectContainer.

source

public ObjectContainer source()
returns the source ObjectContainer.

Returns:
the source ObjectContainer

sourceObject

public java.lang.Object sourceObject()
gets the object that caused the conflict from the source ObjectContainer.

Returns:
the object as it exists in the source ObjectContainer.

useSource

public void useSource()
instructs the replication process to store the object from the source ObjectContainer to both ObjectContainers.

If neither #useSource() nor #useDestination() is called in the Db4oCallback, replication will ignore the object that caused the conflict.


useDestination

public void useDestination()
instructs the replication process to store the object from the destination ObjectContainer to both ObjectContainers.

If neither #useSource() nor #useDestination() is called in the Db4oCallback, replication will ignore the object that caused the conflict.


db4o 4.0