Skip to main content

AtomicInteger

Complete API reference for AtomicInteger, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Atomic

Component: no


public class AtomicInteger

Constructors

SignatureDescription
AtomicInteger(AtomicInteger)Executes AtomicInteger and returns after the underlying engine call finishes.
AtomicInteger()Executes AtomicInteger and returns after the underlying engine call finishes.
AtomicInteger(int)Creates a new instance of AtomicInteger.

Attributes

NameTypeDescription
instanceAtomicIntegerRepresents the instance value stored on this instance. Read or assign to update the property.

Methods

SignatureReturnsDescription
get()intReturns the current value.
set(int)voidSets or updates the the value.
lazySet(int)voidPerforms the lazySet operation using the provided parameters (value).
getAndSet(int)intReturns the current and set.
getAndIncrement()intReturns the current and increment.
getAndDecrement()intReturns the current and decrement.
incrementAndGet()intExecutes incrementAndGet and returns after the underlying engine call finishes.
decrementAndGet()intExecutes decrementAndGet and returns after the underlying engine call finishes.
getAndAdd(int)intReturns the current and add.
addAndGet(int)intAdds and get to the collection.
compareAndSet(int, int)booleanCompares this instance with another for equality/order.
weakCompareAndSet(int, int)booleanPerforms the weakCompareAndSet operation using the provided parameters (expect, update).