Reference Guide C API www.spreadconcepts.com


Programmer's Reference Guide
Replicated Hash Table
Version 2.0


Key Value Pair Operations

rht_pair_fini must be called once and only once on a rht_pair pointer returned from a successful call to rht_get to allow the memory associated with that entry to be eventually garbage collected. After calling rht_pair_fini on such a reference, it is invalid to subsequently use that reference.

rht_pair_update_type returns the update type of an key-value pair entry. Currently, this can only be RHT_UPDATE_PUT or RHT_UPDATE_DEL, which correspond, respectively, to an entry placed in the table by rht_put or rht_del. Note, the RHT_UPDATE_DEL type can only occur for special delete entries left in the dictionary when RHT_INTERSECT semantics are being used.

rht_pair_key returns a constant pointer to the key of the key-value pair referenced by p. rht_pair_val returns a constant pointer to the value of the key-value pair referenced by p.

rht_pair_time_stamp returns the Lamport Time Stamp (LTS) of the creation of this entry. In rht, a LTS is declared as:

typedef struct {
  rht_name m_Owner;
  su_uint64  m_LTS;
  su_uint64  m_AbsTS;

} rht_stamp;

Where m_Owner is the name of the creator of the associated update or event. m_LTS is the LTS counter at the creator upon creation. m_AbsTS is the local wall clock time at the creator upon creation.



Copyright © 2004, Spread Concepts LLC, All rights reserved