Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Int32BlockPool

    A pool for int blocks similar to ByteBlockPool.

    NOTE: This was IntBlockPool in Lucene

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    Int32BlockPool
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class Int32BlockPool

    Constructors

    Int32BlockPool()

    Creates a new Int32BlockPool with a default Int32BlockPool.Allocator.

    Declaration
    public Int32BlockPool()
    See Also
    NextBuffer()

    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

    INT32_BLOCK_MASK

    NOTE: This was INT_BLOCK_MASK in Lucene

    Declaration
    public static readonly int INT32_BLOCK_MASK
    Field Value
    Type Description
    int

    INT32_BLOCK_SHIFT

    NOTE: This was INT_BLOCK_SHIFT in Lucene

    Declaration
    public static readonly int INT32_BLOCK_SHIFT
    Field Value
    Type Description
    int

    INT32_BLOCK_SIZE

    NOTE: This was INT_BLOCK_SIZE in Lucene

    Declaration
    public static readonly int INT32_BLOCK_SIZE
    Field Value
    Type Description
    int

    Properties

    Buffer

    Current head buffer.

    Declaration
    public int[] Buffer { get; set; }
    Property Value
    Type Description
    int[]

    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
    int[][]

    Int32Offset

    Current head offset.

    NOTE: This was intOffset in Lucene
    Declaration
    public int Int32Offset { get; set; }
    Property Value
    Type Description
    int

    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
    int

    Methods

    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()

    Reset()

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

    Declaration
    public void Reset()

    Reset(bool, bool)

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

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

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

    bool 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.

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.