Search Results for

    Show / Hide Table of Contents

    Class ZoneTreeFactory<TKey, TValue>

    The factory to open or create a ZoneTree.

    Inheritance
    object
    ZoneTreeFactory<TKey, TValue>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Tenray.ZoneTree
    Assembly: ZoneTree.dll
    Syntax
    public sealed class ZoneTreeFactory<TKey, TValue>
    Type Parameters
    Name Description
    TKey

    The key type

    TValue

    The value type

    Constructors

    | Improve this Doc View Source

    ZoneTreeFactory(IFileStreamProvider)

    Creates a new factory.

    Declaration
    public ZoneTreeFactory(IFileStreamProvider fileStreamProvider = null)
    Parameters
    Type Name Description
    IFileStreamProvider fileStreamProvider

    The FileStreamProvider. When it is not given, the LocalFileStreamProvider is used.

    Properties

    | Improve this Doc View Source

    Options

    The options to be configured by this factory.

    Declaration
    public ZoneTreeOptions<TKey, TValue> Options { get; }
    Property Value
    Type Description
    ZoneTreeOptions<TKey, TValue>

    Methods

    | Improve this Doc View Source

    Configure(Action<ZoneTreeOptions<TKey, TValue>>)

    Configures ZoneTree options.

    Declaration
    public ZoneTreeFactory<TKey, TValue> Configure(Action<ZoneTreeOptions<TKey, TValue>> configure)
    Parameters
    Type Name Description
    Action<ZoneTreeOptions<TKey, TValue>> configure

    The options configurator delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    ConfigureDiskSegmentOptions(Action<DiskSegmentOptions>)

    Configures the disk segment options.

    Declaration
    public ZoneTreeFactory<TKey, TValue> ConfigureDiskSegmentOptions(Action<DiskSegmentOptions> configure)
    Parameters
    Type Name Description
    Action<DiskSegmentOptions> configure

    The disk segment options configurator delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    ConfigureTransactionLog(Action<ITransactionLog<TKey, TValue>>)

    Configures the transaction log.

    Declaration
    public ZoneTreeFactory<TKey, TValue> ConfigureTransactionLog(Action<ITransactionLog<TKey, TValue>> configure)
    Parameters
    Type Name Description
    Action<ITransactionLog<TKey, TValue>> configure

    The transaction log configurator delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    ConfigureWriteAheadLogOptions(Action<WriteAheadLogOptions>)

    Configures the write ahead log options.

    Declaration
    public ZoneTreeFactory<TKey, TValue> ConfigureWriteAheadLogOptions(Action<WriteAheadLogOptions> configure)
    Parameters
    Type Name Description
    Action<WriteAheadLogOptions> configure

    The write ahead log options configurator delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    Create()

    Creates a ZoneTree.

    Declaration
    public IZoneTree<TKey, TValue> Create()
    Returns
    Type Description
    IZoneTree<TKey, TValue>

    ZoneTree Factory

    Exceptions
    Type Condition
    DatabaseAlreadyExistsException

    Thrown when the database exists in the location.

    | Improve this Doc View Source

    CreateTransactional()

    Creates a transactional ZoneTree.

    Declaration
    public ITransactionalZoneTree<TKey, TValue> CreateTransactional()
    Returns
    Type Description
    ITransactionalZoneTree<TKey, TValue>

    ZoneTree Factory

    Exceptions
    Type Condition
    DatabaseAlreadyExistsException

    Thrown when the database exists in the location.

    | Improve this Doc View Source

    DisableDeleteValueConfigurationValidation(bool)

    Disables the delete value configuration validation.

    Declaration
    public ZoneTreeFactory<TKey, TValue> DisableDeleteValueConfigurationValidation(bool keepWarning = true)
    Parameters
    Type Name Description
    bool keepWarning

    If true, validation logs a warning when value deletion is not configured.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    Open()

    Opens a ZoneTree.

    Declaration
    public IZoneTree<TKey, TValue> Open()
    Returns
    Type Description
    IZoneTree<TKey, TValue>

    ZoneTree Factory

    Exceptions
    Type Condition
    DatabaseNotFoundException

    Thrown when database is not found in the location.

    | Improve this Doc View Source

    OpenOrCreate()

    Opens or creates a ZoneTree.

    Declaration
    public IZoneTree<TKey, TValue> OpenOrCreate()
    Returns
    Type Description
    IZoneTree<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    OpenOrCreateTransactional()

    Opens or creates a transactional ZoneTree.

    Declaration
    public ITransactionalZoneTree<TKey, TValue> OpenOrCreateTransactional()
    Returns
    Type Description
    ITransactionalZoneTree<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    OpenTransactional()

    Opens a transactional ZoneTree.

    Declaration
    public ITransactionalZoneTree<TKey, TValue> OpenTransactional()
    Returns
    Type Description
    ITransactionalZoneTree<TKey, TValue>

    ZoneTree Factory

    Exceptions
    Type Condition
    DatabaseNotFoundException

    Thrown when database is not found in the location.

    | Improve this Doc View Source

    SetComparer(IRefComparer<TKey>)

    Sets the key-comparer.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetComparer(IRefComparer<TKey> comparer)
    Parameters
    Type Name Description
    IRefComparer<TKey> comparer

    The key-comparer.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetDataDirectory(string)

    Sets the data directory. Default is "./data"

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetDataDirectory(string dataDirectory)
    Parameters
    Type Name Description
    string dataDirectory

    The data directory

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetDiskSegmentCompressionBlockSize(int)

    Configures the disk segment compression block size.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetDiskSegmentCompressionBlockSize(int blockSize)
    Parameters
    Type Name Description
    int blockSize

    The block size

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    Exceptions
    Type Condition
    Exception

    Thrown when compression block size is not valid.

    | Improve this Doc View Source

    SetDiskSegmentMaxItemCount(int)

    Configures disk segment maximum item count.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetDiskSegmentMaxItemCount(int diskSegmentMaxItemCount)
    Parameters
    Type Name Description
    int diskSegmentMaxItemCount

    The maximum item count

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetIsValueDeletedDelegate(IsValueDeletedDelegate<TValue>)

    Assigns value deletion query delegate.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetIsValueDeletedDelegate(IsValueDeletedDelegate<TValue> isValueDeleted)
    Parameters
    Type Name Description
    IsValueDeletedDelegate<TValue> isValueDeleted

    The value deleted query delagate.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetKeySerializer(ISerializer<TKey>)

    Sets the key serializer.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetKeySerializer(ISerializer<TKey> keySerializer)
    Parameters
    Type Name Description
    ISerializer<TKey> keySerializer

    The key serializer

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetLogLevel(LogLevel)

    Sets log level of current ZoneTree logger.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetLogLevel(LogLevel logLevel)
    Parameters
    Type Name Description
    LogLevel logLevel
    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetLogger(ILogger)

    Assigns a logger for ZoneTree.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetLogger(ILogger logger)
    Parameters
    Type Name Description
    ILogger logger
    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetMarkValueDeletedDelegate(MarkValueDeletedDelegate<TValue>)

    Assigns value deletion marker delegate.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetMarkValueDeletedDelegate(MarkValueDeletedDelegate<TValue> markValueDeleted)
    Parameters
    Type Name Description
    MarkValueDeletedDelegate<TValue> markValueDeleted

    The value deletion marker delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetMutableSegmentMaxItemCount(int)

    Configures mutable segment maximum item count.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetMutableSegmentMaxItemCount(int mutableSegmentMaxItemCount)
    Parameters
    Type Name Description
    int mutableSegmentMaxItemCount

    The maximum item count

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetOptions(ZoneTreeOptions<TKey, TValue>)

    Sets configuration options.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetOptions(ZoneTreeOptions<TKey, TValue> options)
    Parameters
    Type Name Description
    ZoneTreeOptions<TKey, TValue> options

    The configuration options.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetRandomAccessDeviceManager(IRandomAccessDeviceManager)

    Sets random access device manager.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetRandomAccessDeviceManager(IRandomAccessDeviceManager randomAccessDeviceManager)
    Parameters
    Type Name Description
    IRandomAccessDeviceManager randomAccessDeviceManager

    The random access device manager.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetTransactionLog(Func<ZoneTreeOptions<TKey, TValue>, ITransactionLog<TKey, TValue>>)

    Sets the transaction log creator delegate.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetTransactionLog(Func<ZoneTreeOptions<TKey, TValue>, ITransactionLog<TKey, TValue>> transactionLogGetter)
    Parameters
    Type Name Description
    Func<ZoneTreeOptions<TKey, TValue>, ITransactionLog<TKey, TValue>> transactionLogGetter

    The transaction log creator delegate

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetValueSerializer(ISerializer<TValue>)

    Sets the value serializer.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetValueSerializer(ISerializer<TValue> valueSerializer)
    Parameters
    Type Name Description
    ISerializer<TValue> valueSerializer

    The value serializer

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetWriteAheadLogDirectory(string)

    Sets write ahead log directory.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetWriteAheadLogDirectory(string walDirectory)
    Parameters
    Type Name Description
    string walDirectory

    The write ahead log directory.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    | Improve this Doc View Source

    SetWriteAheadLogProvider(Func<ZoneTreeOptions<TKey, TValue>, IWriteAheadLogProvider>)

    Sets write ahead log provider getter.

    Declaration
    public ZoneTreeFactory<TKey, TValue> SetWriteAheadLogProvider(Func<ZoneTreeOptions<TKey, TValue>, IWriteAheadLogProvider> walProviderGetter)
    Parameters
    Type Name Description
    Func<ZoneTreeOptions<TKey, TValue>, IWriteAheadLogProvider> walProviderGetter

    The write ahead log provider getter.

    Returns
    Type Description
    ZoneTreeFactory<TKey, TValue>

    ZoneTree Factory

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 Tenray.io