kv_create_durability()

#include <kvstore.h>

kv_durability_t 
kv_create_durability(kv_sync_policy_enum master,
                     kv_sync_policy_enum replica,
                     kv_ack_policy_enum ack) 

Creates a durability policy, which is then used for store write operations such as kv_put_with_options() or kv_delete_with_options(). The durability policy can also be used with a set of operations performed in a single transaction, using kv_execute().

The overall durability is a function of the sync policy in effect for the master, the sync policy in effect for each replica, and the replication acknowledgement policy in effect for the replication group.

Parameters

  • master

    The master parameter defines the synchronization policy in effect for the master in this replication group for this durability guarantee. See kv_sync_policy_enum for a list of the synchronization policies that you can set.

  • replica

    The replica parameter defines the synchronization policy in effect for the replicas in this replication group for this durability guarantee. See kv_sync_policy_enum for a list of the synchronization policies that you can set.

  • ack

    The ack parameter defines the acknowledgement policy to be used for this durability guarantee. The acknowledgment policy describes how many replicas must respond to, or acknowledge a transaction commit before the master considers the transaction completed. See kv_ack_policy_enum for a list of the possible acknowledgement policies.