Show / Hide Table of Contents

    Class Int32BlockPool

    A pool for blocks similar to ByteBlockPool.

    NOTE: This was IntBlockPool in Lucene

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    Int32BlockPool
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class Int32BlockPool : object

    Constructors

    | Improve this Doc View Source

    Int32BlockPool()

    Creates a new Int32BlockPool with a default Int32BlockPool.Allocator.

    Declaration
    public Int32BlockPool()
    See Also
    NextBuffer()
    | Improve this Doc View Source

    Int32BlockPool(Int32BlockPool.Allocator)

    Creates a new Int32BlockPool with the given Int32BlockPool.Allocator.

    Declaration
    public Int32BlockPool(Int32BlockPool.Allocator allocator)
    Parameters
    Type Name Description
    Int32BlockPool.Allocator allocator
    See Also
    NextBuffer()

    Fields

    | Improve this Doc View Source

    INT32_BLOCK_MASK

    NOTE: This was INT_BLOCK_MASK in Lucene

    Declaration
    public static readonly int INT32_BLOCK_MASK
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    INT32_BLOCK_SHIFT

    NOTE: This was INT_BLOCK_SHIFT in Lucene

    Declaration
    public static readonly int INT32_BLOCK_SHIFT
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    INT32_BLOCK_SIZE

    NOTE: This was INT_BLOCK_SIZE in Lucene

    Declaration
    public static readonly int INT32_BLOCK_SIZE
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    Buffer

    Current head buffer.

    Declaration
    public int[] Buffer { get; set; }
    Property Value
    Type Description
    System.Int32[]
    | Improve this Doc View Source

    Buffers

    Array of buffers currently used in the pool. Buffers are allocated if needed don't modify this outside of this class.

    Declaration
    public int[][] Buffers { get; set; }
    Property Value
    Type Description
    System.Int32[][]
    | Improve this Doc View Source

    Int32Offset

    Current head offset.

    NOTE: This was intOffset in Lucene

    Declaration
    public int Int32Offset { get; set; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Int32Upto

    Pointer to the current position in head buffer

    NOTE: This was intUpto in Lucene

    Declaration
    public int Int32Upto { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    NextBuffer()

    Advances the pool to its next buffer. This method should be called once after the constructor to initialize the pool. In contrast to the constructor a Reset() call will advance the pool to its first buffer immediately.

    Declaration
    public void NextBuffer()
    | Improve this Doc View Source

    Reset()

    Resets the pool to its initial state reusing the first buffer. Calling NextBuffer() is not needed after reset.

    Declaration
    public void Reset()
    | Improve this Doc View Source

    Reset(Boolean, Boolean)

    Expert: Resets the pool to its initial state reusing the first buffer.

    Declaration
    public void Reset(bool zeroFillBuffers, bool reuseFirst)
    Parameters
    Type Name Description
    System.Boolean zeroFillBuffers

    If true the buffers are filled with 0. this should be set to true if this pool is used with Int32BlockPool.SliceWriter.

    System.Boolean reuseFirst

    If true the first buffer will be reused and calling NextBuffer() is not needed after reset if the block pool was used before ie. NextBuffer() was called before.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)