db4o 7.4

com.db4o.replication
Interface ReplicationConflictHandler


Deprecated. Since db4o-5.2. Use db4o Replication System (dRS) instead.

public interface ReplicationConflictHandler

will be called by a ReplicationProcessupon replication conflicts. Conflicts occur whenever ReplicationProcess.replicate(Object)is called with an object that was modified in both ObjectContainers since the last replication run between the two.


Method Summary
 java.lang.Object resolveConflict(ReplicationProcess replicationProcess, java.lang.Object a, java.lang.Object b)
          Deprecated. the callback method to be implemented to resolve a conflict.
 

Method Detail

resolveConflict

java.lang.Object resolveConflict(ReplicationProcess replicationProcess,
                                 java.lang.Object a,
                                 java.lang.Object b)
Deprecated. 
the callback method to be implemented to resolve a conflict.

Parameters:
replicationProcess - the ReplicationProcessfor which this ReplicationConflictHandler is registered
a - the object modified in the peerA ObjectContainer
b - the object modified in the peerB ObjectContainer
Returns:
the object (a or b) that should prevail in the conflict or null, if no action is to be taken. If this would violate the direction set with ReplicationProcess.setDirection(ObjectContainer, ObjectContainer) no action will be taken.
See Also:
ReplicationProcess.peerA(), ReplicationProcess.peerB()

db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.