NCache 4.6 - Online Documentation

IBridgeConflictResolver Interface

       To utilize the IBridgeConflictResolver interface, include the following namespace in your application: Alachisoft.NCache.Runtime.Bridge.
 void Dispose();
        void Init(IDictionary parameters);
        ConflictResolution Resolve(ProviderBridgeItem oldEntry, ProviderBridgeItem newEntry);
This method performs tasks like allocating resources, acquiring connections etc. When cache is initialized and Conflict Resolvers is enabled, Init method is called to notify the client that cache is initializing and the client can initialize its Conflict Resolver via Init. The parameters passed as an argument contains all the parameters (if any) that were specified using NCache Manager cache/cluster views. These parameters can be utilized in many ways.
This method performs tasks like releasing the resources etc. When Cache is stopped or the task is completed, it calls the Dispose() method to notify the client that it can now free the resources related to its task.
This method contains the logic to resolve the conflict occur while replicating an operation from bridge for a key that already exists in the cache. Whenever any conflict occurs, cache call BridgeConflictResolution to decides which operation to apply on the cache depending upon rules implemented in it. It takes two parameters/entries, both are of ProviderBridgeItem type. ProviderBridgeItem contains the following parameters:
·     BridgeItemVersion contains version of an item (LATEST, OLD, SAME).
·     Key contains key of an item.
·     Value contains value of an item.
·     BridgeItemOpCodes contains conflicted operation (Add, Remove, Update, Clear, RemoveGroup, RegisterKeyNotification etc) .
See Also