Class Counter
Simple counter class
This is a Lucene.NET INTERNAL API, use at your own risk
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inheritance
System.Object
    Counter
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Lucene.Net.Util
Assembly: Lucene.Net.dll
Syntax
public abstract class CounterProperties
| Improve this Doc View SourceValue
Gets the counters current value.
Declaration
public abstract long Value { get; }Property Value
| Type | Description | 
|---|---|
| System.Int64 | 
Methods
| Improve this Doc View SourceAddAndGet(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. | 
Get()
Returns the counters current value.
Declaration
[Obsolete("Use Value instead. This method will be removed in 4.8.0 release candidate.")]
public virtual long Get()Returns
| Type | Description | 
|---|---|
| System.Int64 | The counters current value. | 
NewCounter()
Returns a new counter. The returned counter is not thread-safe.
Declaration
public static Counter NewCounter()Returns
| Type | Description | 
|---|---|
| Counter | 
NewCounter(Boolean)
Returns a new counter.
Declaration
public static Counter NewCounter(bool threadSafe)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | threadSafe | 
 | 
Returns
| Type | Description | 
|---|---|
| Counter | A new counter. | 
Operators
| Improve this Doc View SourceImplicit(Counter to Int64)
Returns this counter's Value implicitly.
Declaration
public static implicit operator long (Counter counter)Parameters
| Type | Name | Description | 
|---|---|---|
| Counter | counter | 
Returns
| Type | Description | 
|---|---|
| System.Int64 |