C# 클래스 BerkeleyDB.HashDatabaseConfig

A class representing configuration parameters for HashDatabase
상속: BerkeleyDB.DatabaseConfig
파일 보기 프로젝트 열기: yasuhirokimura/db18 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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