BlockIndex

Description

class Tinman.Core.Database.BlockIndex
<TKey>
<TValue>

Derived from

BlockIndexBase abstract

Extended by

SimpleBlockIndex sealed

Abstract base class for persistent dictionaries that use a block-based index data structure (B-Tree) for efficiency.

Public / Methods

Delete​Key


[BeginWriteEnd]
public method DeleteKey → (1)

key in : TKey

Key of the entry to delete.

Deletes an entry from the block tree.

If no entry exists for the given key, the method silently returns.

IOException

If an I/O error has occurred.

Delete​Value


[BeginWriteEnd]
public method DeleteValue → (1)

value in : TValue

Value of the entry to delete.

Deletes an entry from the block tree.

If no entry exists for the given key, the method silently returns.

IOException

If an I/O error has occurred.

Find


[BeginEnd]
public method Find → (2)

key in : TKey

Key of the entry to find.

defaultValue opt : TValue = default(TValue)

Default value to return if no entry exists for key in.

returns → TValue

The value of the found entry or defaultValue opt if not found.

Tries to find an entry in the block tree.

IOException

If an I/O error has occurred.

Find​All


[BeginEnd]
public method FindAll → (1)

result opt : CollectorDelegate<TValue> = null

Optional collector for found entries.

returns → int32

Number of entries.

Finds all entries.

IOException

If an I/O error has occurred.

Find​From


[BeginEnd]
public method FindFrom → (3)

from in : TKey

The first key to find.

fromIncluded in : bool

Return from in as a result?

result opt : CollectorDelegate<TValue> = null

Optional collector for found entries.

returns → int32

Number of found entries.

Finds all entries starting at the given key.

IOException

If an I/O error has occurred.

Find​From​To


[BeginEnd]
public method FindFromTo → (5)

from in : TKey

The first key to find.

fromIncluded in : bool

Return from in as a result?

to in : TKey

The last key to find.

toIncluded in : bool

Return to in as a result?

result opt : CollectorDelegate<TValue> = null

Optional collector for found entries.

returns → int32

Number of found entries.

Finds all entries that are included in the given key range.

IOException

If an I/O error has occurred.

Find​Maximum


[BeginEnd]
public method FindMaximum → (2)

upper in : TKey

The upper bound for entry key values (inclusive).

defaultValue opt : TValue = default(TValue)

Default value to return if no entry is found.

returns → TValue

The found entry or defaultValue opt if not found.

Tries to find an entry in the block tree.

All entries that have keys less than or equal to the given upper bound are included in the search. From all included entries, the one with the biggest key value is returned.

IOException

If an I/O error has occurred.

Find​Minimum


[BeginEnd]
public method FindMinimum → (2)

lower in : TKey

The lower bound for entry key values (inclusive).

defaultValue opt : TValue = default(TValue)

Default value to return if no entry is found.

returns → TValue

The value of the entry or defaultValue opt if not found.

Tries to find an entry in the block tree.

All entries that have keys greater than or equal to the given lower bound are included in the search. From all included entries, the one with the smallest key value is returned.

IOException

If an I/O error has occurred.

Find​To


[BeginEnd]
public method FindTo → (3)

to in : TKey

The last key to find.

toIncluded in : bool

Return to in as a result?

result opt : CollectorDelegate<TValue> = null

Optional collector for found entries.

returns → int32

Number of found entries.

Finds all entries up to the given key.

IOException

If an I/O error has occurred.

Insert


[BeginWriteEnd]
public method Insert → (1)

value in : TValue

Value of the entry to insert or update.

Inserts or updates an entry in the block tree.

If an entry already exists for the given value in, it will be updated. If no entry exists, a new one will be inserted into the index.

IOException

If an I/O error has occurred.

Public / Attributes

Maximum​Key


[BeginEnd]
public attribute MaximumKey → (get)

value : TKey

The maximum entry key.

Returns the maximum entry key in the index.

IOException

If an I/O error has occurred.

Maximum​Value


[BeginEnd]
public attribute MaximumValue → (get)

value : TValue

The maximum entry value.

Returns the maximum entry value in the index.

IOException

If an I/O error has occurred.

Minimum​Key


[BeginEnd]
public attribute MinimumKey → (get)

value : TKey

The minimum entry key.

Returns the minimum entry key in the index.

IOException

If an I/O error has occurred.

Minimum​Value


[BeginEnd]
public attribute MinimumValue → (get)

value : TValue

The minimum entry value.

Returns the minimum entry value in the index.

IOException

If an I/O error has occurred.