Class ContendedAtomicInteger
java.lang.Object
com.conversantmedia.util.concurrent.ContendedAtomicInteger
Avoid false cache line sharing
Created by jcairns on 5/28/14.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancompareAndSet(int expect, int i) intget()voidset(int i) toString()
-
Field Details
-
CACHE_LINE_INTS
private static final int CACHE_LINE_INTS -
contendedArray
-
-
Constructor Details
-
ContendedAtomicInteger
public ContendedAtomicInteger(int init)
-
-
Method Details
-
get
public int get() -
set
public void set(int i) -
compareAndSet
public boolean compareAndSet(int expect, int i) -
toString
-