From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/api_reference/C/repset_view.html | 238 ++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 docs/api_reference/C/repset_view.html (limited to 'docs/api_reference/C/repset_view.html') diff --git a/docs/api_reference/C/repset_view.html b/docs/api_reference/C/repset_view.html new file mode 100644 index 00000000..8f194d6c --- /dev/null +++ b/docs/api_reference/C/repset_view.html @@ -0,0 +1,238 @@ + + + + + + DB_ENV->rep_set_view() + + + + + + + + + +
+
+
+
+

DB_ENV->rep_set_view()

+
+
+
+
#include <db.h>
+
+int
+DB_ENV->rep_set_view(DB_ENV *env,
+    int (*partial_func)(DB_ENV *dbenv,
+    const char *name, int *result, u_int32_t flags));  
+

+ The DB_ENV->rep_set_view() method specifies + that this environment is a replication view. A replication view is + a special type of client that can contain a full or partial copy of + the replicated data. A partial view uses a callback to determine + the subset of database files to replicate. A replication view does + not vote in elections, cannot become master, and cannot contribute + to transactional durability. +

+

+ The DB_ENV->rep_set_view() method + configures operations performed using the specified + DB_ENV handle, not all operations + performed on the underlying database environment. +

+

+ The DB_ENV->rep_set_view() method must be + called prior to opening the environment. Also the method must be + called every time the environment is used after that point. Once + an environment is configured as a view, it stays that way for the + lifetime of the environment. +

+

+ The DB_ENV->rep_set_view() + + method returns a non-zero error value on failure and 0 on success. + + + +

+
+

Note

+

+ Berkeley DB is not re-entrant. The callback function for + this method should not attempt to make library calls (for + example, to release locks or close open handles). + Re-entering Berkeley DB is not guaranteed to work + correctly, and the results are undefined. +

+
+
+
+
+
+

Parameters

+
+
+
+
+
+
+
+

partial_func

+
+
+
+

+ The partial_func + callback function determines whether a particular + database file should be replicated to the local site. If + a NULL callback is specified, all database files will be + replicated. The parameters to + partial_func are as follows: +

+
+
    +
  • +

    + dbenv +

    +

    + The dbenv + parameter is the enclosing database environment + handle. +

    +
  • +
  • +

    + name +

    +

    + The name + parameter is the physical on-disk file name of the + database. In-memory databases are always + replicated and do not invoke this callback. +

    +
  • +
  • +

    + result +

    +

    + The result parameter is + an output parameter indicating whether the file should be + replicated. Set it to 0 to reject this file or to a + non-zero value to accept this file. +

    +
  • +
  • +

    + flags +

    +

    + The flags + parameter is currently unused. +

    +
  • +
+
+

+ The partial function must + return 0 on success and non-zero on failure. If the + partial function fails, the environment will panic. +

+
+
+
+
+
+
+

Errors

+
+
+
+

+ The DB_ENV->rep_set_view() + + + method may fail and return one of the following non-zero errors: + + + +

+
+
+
+
+

EINVAL

+
+
+
+

+ The method was called after the environment was opened. +

+
+
+
+
+
+
+

Class

+
+
+
+

+ DB_ENV +

+
+
+
+
+
+

See Also

+
+
+
+

+ Replication and Related Methods +

+
+
+ + + -- cgit v1.2.1