Version 10.0.2
WiredTiger Extension API

The functions and interfaces applications use to customize and extend the behavior of WiredTiger. More...

Classes

struct  WT_COLLATOR
 The interface implemented by applications to provide custom ordering of records. More...
 
struct  WT_COMPRESSOR
 The interface implemented by applications to provide custom compression. More...
 
struct  WT_DATA_SOURCE
 Applications can extend WiredTiger by providing new implementations of the WT_DATA_SOURCE class. More...
 
struct  WT_ENCRYPTOR
 The interface implemented by applications to provide custom encryption. More...
 
struct  WT_EXTRACTOR
 The interface implemented by applications to provide custom extraction of index keys or column group values. More...
 
struct  WT_FILE_SYSTEM
 The interface implemented by applications to provide a custom file system implementation. More...
 
struct  WT_FILE_HANDLE
 A file handle implementation returned by WT_FILE_SYSTEM::open_file. More...
 
struct  WT_EXTENSION_SPINLOCK
 A placeholder data structure that allows for using the WiredTiger spinlock implementation from within extensions. More...
 
struct  WT_EXTENSION_API
 Table of WiredTiger extension methods. More...
 

Macros

#define WT_FS_OPEN_ACCESS_RAND
 WT_FILE_SYSTEM::open_file flags: random access pattern.
 
#define WT_FS_OPEN_ACCESS_SEQ
 WT_FILE_SYSTEM::open_file flags: sequential access pattern.
 
#define WT_FS_OPEN_CREATE
 WT_FILE_SYSTEM::open_file flags: create if does not exist.
 
#define WT_FS_OPEN_DIRECTIO
 WT_FILE_SYSTEM::open_file flags: direct I/O requested.
 
#define WT_FS_OPEN_DURABLE
 WT_FILE_SYSTEM::open_file flags: file creation must be durable.
 
#define WT_FS_OPEN_EXCLUSIVE
 WT_FILE_SYSTEM::open_file flags: return EBUSY if exclusive use not available.
 
#define WT_FS_OPEN_READONLY
 WT_FILE_SYSTEM::open_file flags: open is read-only.
 
#define WT_FS_DURABLE
 WT_FILE_SYSTEM::remove or WT_FILE_SYSTEM::rename flags: the remove or rename operation must be durable.
 
#define WT_FILE_HANDLE_DONTNEED
 WT_FILE_HANDLE::fadvise flags: no longer need.
 
#define WT_FILE_HANDLE_WILLNEED
 WT_FILE_HANDLE::fadvise flags: will need.
 

Typedefs

typedef struct WT_CONFIG_ARG WT_CONFIG_ARG
 

Enumerations

enum  WT_FS_OPEN_FILE_TYPE {
  WT_FS_OPEN_FILE_TYPE_CHECKPOINT, WT_FS_OPEN_FILE_TYPE_DATA, WT_FS_OPEN_FILE_TYPE_DIRECTORY, WT_FS_OPEN_FILE_TYPE_LOG,
  WT_FS_OPEN_FILE_TYPE_REGULAR
}
 WT_FILE_SYSTEM::open_file file types. More...
 

Functions

int wiredtiger_extension_init (WT_CONNECTION *connection, WT_CONFIG_ARG *config)
 Entry point to an extension, called when the extension is loaded. More...
 
int wiredtiger_extension_terminate (WT_CONNECTION *connection)
 Optional cleanup function for an extension, called during WT_CONNECTION::close. More...
 

Detailed Description

The functions and interfaces applications use to customize and extend the behavior of WiredTiger.


Class Documentation

◆ __wt_extension_spinlock

struct __wt_extension_spinlock

A placeholder data structure that allows for using the WiredTiger spinlock implementation from within extensions.

Class Members
void * spinlock

Typedef Documentation

◆ WT_CONFIG_ARG

A configuration object passed to some extension interfaces. This is an opaque type: configuration values can be queried using WT_EXTENSION_API::config_get

Enumeration Type Documentation

◆ WT_FS_OPEN_FILE_TYPE

WT_FILE_SYSTEM::open_file file types.

Enumerator
WT_FS_OPEN_FILE_TYPE_CHECKPOINT 

open a data file checkpoint

WT_FS_OPEN_FILE_TYPE_DATA 

open a data file

WT_FS_OPEN_FILE_TYPE_DIRECTORY 

open a directory

WT_FS_OPEN_FILE_TYPE_LOG 

open a log file

WT_FS_OPEN_FILE_TYPE_REGULAR 

open a regular file

Function Documentation

◆ wiredtiger_extension_init()

int wiredtiger_extension_init ( WT_CONNECTION connection,
WT_CONFIG_ARG config 
)

Entry point to an extension, called when the extension is loaded.

Parameters
connectionthe connection handle
configthe config information passed to WT_CONNECTION::load_extension
Returns
zero on success and a non-zero error code on failure. See Error handling for details.
Examples
nop_encrypt.c, rotn_encrypt.c, and sodium_encrypt.c.

◆ wiredtiger_extension_terminate()

int wiredtiger_extension_terminate ( WT_CONNECTION connection)

Optional cleanup function for an extension, called during WT_CONNECTION::close.

Parameters
connectionthe connection handle
Returns
zero on success and a non-zero error code on failure. See Error handling for details.