Class SegmentedAtomicInteger

java.lang.Object
java.lang.Number
com.gigaspaces.internal.utils.concurrent.SegmentedAtomicInteger
All Implemented Interfaces:
Serializable

public class SegmentedAtomicInteger extends Number
Provides a segmented counter while the get() returns an accurate result.
Since:
7.1
Author:
Guy
See Also:
  • Constructor Details

    • SegmentedAtomicInteger

      public SegmentedAtomicInteger()
    • SegmentedAtomicInteger

      public SegmentedAtomicInteger(int initialValue)
    • SegmentedAtomicInteger

      public SegmentedAtomicInteger(int initialValue, int concurrencyLevel)
  • Method Details

    • decrement

      public void decrement()
    • increment

      public void increment()
    • add

      public void add(int delta)
    • decrementAndGet

      public int decrementAndGet()
    • incrementAndGet

      public int incrementAndGet()
    • addAndGet

      public int addAndGet(int delta)
    • get

      public int get()
    • doubleValue

      public double doubleValue()
      Specified by:
      doubleValue in class Number
    • floatValue

      public float floatValue()
      Specified by:
      floatValue in class Number
    • intValue

      public int intValue()
      Specified by:
      intValue in class Number
    • longValue

      public long longValue()
      Specified by:
      longValue in class Number
    • reset

      public void reset()
      Reset the counter in a non atomic fashion, at a quiscient state this method will reset the counter to its initial value, but in a concurrent state, interleaving operations affect is not deterministic and may be overridden or accumulated. A normal use would be a reset of statistic counter that the precise accumulation of statistics is not mandatory.