BlockIdSlot

Description

struct Tinman.Core.Database.BlockIdSlot

Describes the location of a 64-bit word for storing a block ID value in the file of a block storage.

Public / Constants

Index​Format


public static readonly attribute IndexFormat → (IBlockIndexFormat<BlockIdSlot>)

Block index format for BlockIdSlot values.

Public / Methods

At


public static method At → (1)

fileOffset in : int64

[>=0]
The absolute file offset.

returns → BlockIdSlot

The BlockIdSlot value.

Creates a new instance of BlockIdSlot for an absolute file offset.

Free


[BeginEnd]
public method Free → (1)

storage in : BlockStorage

[not-null]
The block storage.

Frees the storage block (if any).

IOException

If an I/O error has occurred.

New


[BeginEnd]
public static method New → (1)

storage in : BlockStorage

[not-null]
The block storage.

returns → BlockIdSlot

The BlockIdSlot value.

Creates a new instance of BlockIdSlot for a storage block.

IOException

If an I/O error has occurred.

Read


[BeginEnd]
public method Read → (1)

storage in : BlockStorage

[not-null]
The block storage.

returns → int64

The block index root node ID.

Reads the block index root node ID.

IOException

If an I/O error has occurred.

To​String


public override method ToString → ()

returns → string

The string representation.

Returns the string representation of this value.

The string representation is '(A:XXXXXXXX)' or '(B:XXXXXXXX)', where XXXXXXXX is the value of Location as an 8-digit hexadecimal number and A, B refer to the value true, false of Absolute, respectively.

Write


[BeginEnd]
public method Write → (2)

storage in : BlockStorage

[not-null]
The block storage.

rootId in : int64

The block index root node ID.

Writes the block index root node ID.

IOException

If an I/O error has occurred.

Public / Attributes

Absolute


public readonly attribute Absolute → (bool)

Does Location refer to an absolute file offset (true) or to a block ID (false)?

Location


public readonly attribute Location → (int64)

Location of the 64-bit word that holds the block ID value.

This is either an absolute file offset (if Absolute is true) or a block ID (if Absolute is false).