Db::set_partition_dirs()

#include <db_cxx.h>

int
Db::set_partition_dirs(const char **dirs); 

Specify which directories will contain the database extents. If the number of directories is less than the number of partitions, the directories will be used in a round robin fashion.

The Db::set_partition_dirs() method may not be called after the Db::open() method is called.

The Db::set_partition_dirs() method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters

dirs

The dirs points to an array of directories that will be used to create or locate the database extent files specified to the Db::open() method. The directories must be included in the environment list specified by DbEnv::add_data_dir().

Errors

The Db::set_partition_dirs() method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

EINVAL

An invalid flag value or parameter was specified.

Class

Db

See Also

Database and Related Methods