Class Atomics

java.lang.Object
com.google.common.util.concurrent.Atomics

@Deprecated(since="2022-12-01") public final class Atomics extends Object
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
Static utility methods pertaining to classes in the java.util.concurrent.atomic package.
Since:
10.0
  • Method Details

    • newReference

      public static <V> AtomicReference<V> newReference()
      Deprecated.
      Creates an AtomicReference instance with no initial value.
      Returns:
      a new AtomicReference with no initial value
    • newReference

      public static <V> AtomicReference<V> newReference(@Nullable V initialValue)
      Deprecated.
      Creates an AtomicReference instance with the given initial value.
      Parameters:
      initialValue - the initial value
      Returns:
      a new AtomicReference with the given initial value
    • newReferenceArray

      public static <E> AtomicReferenceArray<E> newReferenceArray(int length)
      Deprecated.
      Creates an AtomicReferenceArray instance of given length.
      Parameters:
      length - the length of the array
      Returns:
      a new AtomicReferenceArray with the given length
    • newReferenceArray

      public static <E> AtomicReferenceArray<E> newReferenceArray(E[] array)
      Deprecated.
      Creates an AtomicReferenceArray instance with the same length as, and all elements copied from, the given array.
      Parameters:
      array - the array to copy elements from
      Returns:
      a new AtomicReferenceArray copied from the given array