Show / Hide Table of Contents

    Class Counter

    Simple counter class

    @lucene.internal

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

    Methods

    | Improve this Doc View Source

    AddAndGet(Int64)

    Adds the given delta to the counters current value.

    Declaration
    public abstract long AddAndGet(long delta)
    Parameters
    Type Name Description
    System.Int64 delta

    The delta to add.

    Returns
    Type Description
    System.Int64

    The counters updated value.

    | Improve this Doc View Source

    Get()

    Returns the counters current value.

    Declaration
    public abstract long Get()
    Returns
    Type Description
    System.Int64

    The counters current value.

    | Improve this Doc View Source

    NewCounter()

    Returns a new counter. The returned counter is not thread-safe.

    Declaration
    public static Counter NewCounter()
    Returns
    Type Description
    Counter
    | Improve this Doc View Source

    NewCounter(Boolean)

    Returns a new counter.

    Declaration
    public static Counter NewCounter(bool threadSafe)
    Parameters
    Type Name Description
    System.Boolean threadSafe

    true if the returned counter can be used by multiple threads concurrently.

    Returns
    Type Description
    Counter

    A new counter.

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