Reference Guide C API www.spreadconcepts.com


C API
Replicated Hash Table
Version 2.0


rht_on_update_cb
 

void rht_on_update_cb (rht r, const struct rht_pair *new_entry, const struct rht_pair *old_entry);



Parameters
  r handle of replica performing an update
  new_entry key value pair of entry being added to the table entry with this key
  old_entry key value pair of entry being removed from the table with this key


Return Values
  none


Description
 

on_update_cb user callback function called every time an update is made to a replica. new_entry is the new entry in the table and old_entry is the previous entry in the table at the same key. Either of these parameters can be NULL, which represents the presence of no entry.

For example, if new_entry was non-NULL and old_entry was NULL, then this would be the case where a new entry is being inserted into the table where previously no matching key existed.

Similarly, if new_entry was NULL, then this would mean a pre-existing key was being deleted.

Note, that upon entry into the callback the dictionary has already been structurally changed to reflect the update.



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