Reference Guide C API www.spreadconcepts.com


C API
Replicated Hash Table
Version 2.0


rht_size
  rht_code rht_size(rht r, size_t *sz, int flags);


Parameters
  r replica handle of replica being queried
  sz returned size of the replica being queried
  flags RHT_DIRTY_READ (default) or RHT_CLEAN_READ
    RHT_GET_DELETES (optional)


Return Values
  0 on success
  non-zero for error


Description
 

rht_size returns the number of key-value pairs contained in a replica.

Use RHT_GET_DELETES to include deleted entries in the size count.

Use of the default RHT_DIRTY_READ flag will cause rht_size to return the size count immediately without waiting for any locally generated updates to be applied. Whereas, specifying the RHT_CLEAN_READ will first apply all locally generated updates, and then return the replica size.

***This size can change in the next instant if the dictionary is not locked. ***



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