Reference Guide C API www.spreadconcepts.com


C API
Replicated Hash Table
Version 2.0


rht_snapshot
  rht_code rht_snapshot(rht r, rht_snap *snap, int flags);


Parameters
  r replica handle of replica to take a snapshot of
  snap returned snapshot (initialized to the state of r at the time of the function call)
  flags RHT_DIRTY_READ (default) or RHT_CLEAN_READ
    RHT_GET_DELETES (optional)


Return Values
  0 on success
  non-zero for error


Description
 

rht_snapshot initializes a snapshot of the current state of the specified replica. The replica is temporarily locked and references to all the current entries in the replica are inserted into a constant, local dictionary (rht_snap). For more information on snapshots, see snapshot reference.

Use RHT_GET_DELETES to include deleted entries in the snapshot.

Use of the default RHT_DIRTY_READ flag will cause rht_snapshot snapshot 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 perform the snapshot.



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


Also See
  RHT reference guide, snapshot reference


Copyright © 2004, Spread Concepts LLC, All rights reserved