Reference Guide C API www.spreadconcepts.com


C API
Replicated Hash Table
Version 2.0


rht_on_synch_diff_cb
  void rht_on_synch_diff_cb(rht r, const struct rht_nset *synced, rht_synch_type t, const struct                                                   rht_nset *diff, const struct rht_nset *synching);


Parameters
  r handle of replica performing a synchronization
  synced names of the replicas in the replication system with which this replica is currently completely synchronized
  t synchronization type
  diff names of the formerly synchronized replicas with which communication was lost OR names of the newly synchronized replicas, depending on the synchronization type t
  synching names of the other replicas in the replication system with which this replica is still attempting to synchronize


Return Values
  none


Description
 

on_synch_diff_cb is called every time the level of synchronization of a replica with respect to other replicas changes.

synced contains the names of the replicas in the replication system with which this replica is currently completely synchronized (including itself).

synching contains the names of the other replicas in the replication system with which this replica is still attempting to synchronize (synching is disjoint from synced).

The parameter t indicates the type of synchronization change causing this callback and the meaning of the contents of diff. t can be one of following

RHT_SYNCH_SUBTRACTIVE indicates a loss of communication with formerly synchronized replicas
RHT_SYNCH_NEUTRAL indicates a change solely in the set of actively synchronizing replicas (synching)
RHT_SYNCH_ADDITIVE indicates completion of synchronization with formerly unsynchronized replicas

RHT_SYNCH_SUBTRACTIVE indicates that diff contains the names of the formerly synchronized replicas with which communication was lost.

RHT_SYNCH_NEUTRAL indicates that diff is empty -- if you want to track changes in the synching set, you will need to track them yourself.

RHT_SYNCH_ADDITIVE indicates that diff contains the names of the newly synchronized replicas.

Note, that the synching set can change for all three types. t and diff are really only there to distinguish between types of changes with respect to completely synchronized replicas.

Note that these name sets are only valid while in the current callback and references to them must not be kept.



Requirements
  Header: Declared in rht.h
Library: Use rht.lib
Version: 2.0


Also See
  RHT reference guide


Copyright © 2004, Spread Concepts LLC, All rights reserved