C# Класс BerkeleyDB.HashDatabaseConfig

A class representing configuration parameters for HashDatabase
Наследование: BerkeleyDB.DatabaseConfig
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
BlobDir string
Creation CreatePolicy
DuplicateCompare EntryComparisonDelegate
Duplicates DuplicatesPolicy
ExternalFileDir string
HashComparison EntryComparisonDelegate
HashFunction HashFunctionDelegate

Private Properties

Свойство Тип Описание
SetPartition bool

Открытые методы

Метод Описание
HashDatabaseConfig ( ) : System

Instantiate a new HashDatabaseConfig object

SetPartitionByCallback ( uint parts, PartitionDelegate partFunc ) : bool

Enable database partitioning using the specified number of partitions and partition function. Return true if the specified number of partitions are successfully enabled; otherwise return false. The number of partitions to create The name of partitioning function

SetPartitionByKeys ( Array keys ) : bool

Enable database partitioning using the specified partition keys. Return true if partitioning is successfully enabled; otherwise return false. An array of DatabaseEntry where each array entry defines the range of key values to be stored in each partition

Приватные методы

Метод Описание
SetPartition ( uint parts, Array partKeys, PartitionDelegate partFunc ) : bool

Описание методов

HashDatabaseConfig() публичный Метод

Instantiate a new HashDatabaseConfig object
public HashDatabaseConfig ( ) : System
Результат System

SetPartitionByCallback() публичный Метод

Enable database partitioning using the specified number of partitions and partition function. Return true if the specified number of partitions are successfully enabled; otherwise return false. The number of partitions to create The name of partitioning function
public SetPartitionByCallback ( uint parts, PartitionDelegate partFunc ) : bool
parts uint
partFunc PartitionDelegate
Результат bool

SetPartitionByKeys() публичный Метод

Enable database partitioning using the specified partition keys. Return true if partitioning is successfully enabled; otherwise return false. An array of DatabaseEntry where each array entry defines the range of key values to be stored in each partition
public SetPartitionByKeys ( Array keys ) : bool
keys Array
Результат bool

Описание свойств

BlobDir публичное свойство

Deprecated. Replaced by ExternalFileDir.
public string BlobDir
Результат string

Creation публичное свойство

The policy for how to handle database creation.
If the database does not already exist and CreatePolicy.NEVER is set, HashDatabase.Open fails.
public CreatePolicy Creation
Результат CreatePolicy

DuplicateCompare публичное свойство

The duplicate data item comparison function.

The comparison function is called whenever it is necessary to compare a data item specified by the application with a data item currently stored in the database. Setting DuplicateCompare implies setting Duplicates to DuplicatesPolicy.SORTED.

If no comparison function is specified, the data items are compared lexically, with shorter data items collating before longer data items.

If the database already exists when HashDatabase.Open is called, the delegate must be the same as that historically used to create the database or corruption can occur.

public EntryComparisonDelegate DuplicateCompare
Результат EntryComparisonDelegate

Duplicates публичное свойство

Policy for duplicate data items in the database. Allows a key/data pair to be inserted into the database even if the key already exists.

The ordering of duplicates in the database for DuplicatesPolicy.UNSORTED is determined by the order of insertion, unless the ordering is otherwise specified by use of a cursor operation or a duplicate sort function. The ordering of duplicates in the database for DuplicatesPolicy.SORTED is determined by the duplicate comparison function. If the application does not specify a comparison function using DuplicateCompare, a default lexical comparison is be used.

DuplicatesPolicy.SORTED is preferred to DuplicatesPolicy.UNSORTED for performance reasons. DuplicatesPolicy.UNSORTED should only be used by applications wanting to order duplicate data items manually.

If the database already exists, the value of Duplicates must be the same as the existing database or an error is returned.

public DuplicatesPolicy Duplicates
Результат DuplicatesPolicy

ExternalFileDir публичное свойство

The path of the directory where external files are stored.

If the database is opened within DatabaseEnvironment, this path setting is ignored during HashDatabase.Open. Use HashDatabase.ExternalFileDir to identify the current storage location of external files after opening the database.

public string ExternalFileDir
Результат string

HashComparison публичное свойство

The Hash key comparison function.

The comparison function is called whenever it is necessary to compare a key specified by the application with a key currently stored in the tree.

If no comparison function is specified, the keys are compared lexically, with shorter keys collating before longer keys.

If the database already exists, the comparison function must be the same as that historically used to create the database or corruption can occur.

public EntryComparisonDelegate HashComparison
Результат EntryComparisonDelegate

HashFunction публичное свойство

A user-defined hash function; if no hash function is specified, a default hash function is used.

Because no hash function performs equally well on all possible data, the user may find that the built-in hash function performs poorly with a particular data set.

If the database already exists, HashFunction must be the same as that historically used to create the database or corruption can occur.

public HashFunctionDelegate HashFunction
Результат HashFunctionDelegate