Class Atomics
- java.lang.Object
-
- com.google.common.util.concurrent.Atomics
-
@Deprecated(since="2022-12-01") public final class Atomics extends java.lang.ObjectDeprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023Static utility methods pertaining to classes in thejava.util.concurrent.atomicpackage.- Since:
- 10.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <V> java.util.concurrent.atomic.AtomicReference<V>newReference()Deprecated.Creates anAtomicReferenceinstance with no initial value.static <V> java.util.concurrent.atomic.AtomicReference<V>newReference(V initialValue)Deprecated.Creates anAtomicReferenceinstance with the given initial value.static <E> java.util.concurrent.atomic.AtomicReferenceArray<E>newReferenceArray(int length)Deprecated.Creates anAtomicReferenceArrayinstance of given length.static <E> java.util.concurrent.atomic.AtomicReferenceArray<E>newReferenceArray(E[] array)Deprecated.Creates anAtomicReferenceArrayinstance with the same length as, and all elements copied from, the given array.
-
-
-
Method Detail
-
newReference
public static <V> java.util.concurrent.atomic.AtomicReference<V> newReference()
Deprecated.Creates anAtomicReferenceinstance with no initial value.- Returns:
- a new
AtomicReferencewith no initial value
-
newReference
public static <V> java.util.concurrent.atomic.AtomicReference<V> newReference(@Nullable V initialValue)Deprecated.Creates anAtomicReferenceinstance with the given initial value.- Parameters:
initialValue- the initial value- Returns:
- a new
AtomicReferencewith the given initial value
-
newReferenceArray
public static <E> java.util.concurrent.atomic.AtomicReferenceArray<E> newReferenceArray(int length)
Deprecated.Creates anAtomicReferenceArrayinstance of given length.- Parameters:
length- the length of the array- Returns:
- a new
AtomicReferenceArraywith the given length
-
newReferenceArray
public static <E> java.util.concurrent.atomic.AtomicReferenceArray<E> newReferenceArray(E[] array)
Deprecated.Creates anAtomicReferenceArrayinstance with the same length as, and all elements copied from, the given array.- Parameters:
array- the array to copy elements from- Returns:
- a new
AtomicReferenceArraycopied from the given array
-
-