public abstract class ReferenceCountUpdater<T extends ReferenceCounted> extends Object
ReferenceCounted
implementationsModifier | Constructor and Description |
---|---|
protected |
ReferenceCountUpdater() |
Modifier and Type | Method and Description |
---|---|
static long |
getUnsafeOffset(Class<? extends ReferenceCounted> clz,
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 AtomicIntegerFieldUpdater<T> |
updater() |
public static long getUnsafeOffset(Class<? extends ReferenceCounted> clz, String fieldName)
protected abstract 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)
Copyright © 2008–2024 The Netty Project. All rights reserved.