Reference Guide C API www.spreadconcepts.com


C API
Replicated Hash Table
Version 2.0


rht_put
  rht_code rht_put(rht r, rht_blob k, rht_blob v, int flags);


Parameters
  r replica handle to insert a key-value pair
  k key of the data to be inserted
  v value of the data to be inserted
  flags must be set to RHT_NO_FLAGS


Return Values
  0 on success
  non-zero for error


Description
 

rht_put inserts the key-value pair (k -> v) into the replica.

If an equivalent key already exists in the rht, then the corresponding key-value pair will be overwritten.

*** Note that if multiple updates to the same entry are performed by different threads around the same time, then the one with the highest LTS (Lamport Time Stamp) will eventually "win," and some of those updates may never be applied to the dictionary at all as they will be seen as "out of date" by the replicas upon receipt.***



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