public abstract class ReferenceCountUpdater<T extends ReferenceCounted>
extends java.lang.Object
ReferenceCounted
implementations限定符 | 构造器和说明 |
---|---|
protected |
ReferenceCountUpdater() |
限定符和类型 | 方法和说明 |
---|---|
static long |
getUnsafeOffset(java.lang.Class<? extends ReferenceCounted> clz,
java.lang.String fieldName) |
int |
initialValue() |
boolean |
isLiveNonVolatile(T instance) |
int |
refCnt(T instance) |
boolean |
release(T instance) |
boolean |
release(T instance,
int decrement) |
void |
resetRefCnt(T instance)
Resets the reference count to 1
|
T |
retain(T instance) |
T |
retain(T instance,
int increment) |
void |
setInitialValue(T instance) |
void |
setRefCnt(T instance,
int refCnt)
An unsafe operation that sets the reference count directly
|
protected abstract long |
unsafeOffset() |
protected abstract java.util.concurrent.atomic.AtomicIntegerFieldUpdater<T> |
updater() |
public static long getUnsafeOffset(java.lang.Class<? extends ReferenceCounted> clz, java.lang.String fieldName)
protected abstract java.util.concurrent.atomic.AtomicIntegerFieldUpdater<T> updater()
protected abstract long unsafeOffset()
public final int initialValue()
public void setInitialValue(T instance)
public final int refCnt(T instance)
public final boolean isLiveNonVolatile(T instance)
public final void setRefCnt(T instance, int refCnt)
public final void resetRefCnt(T instance)
public final boolean release(T instance)
public final boolean release(T instance, int decrement)