Class RefCountMessage
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.RefCountMessage
-
public class RefCountMessage extends Object
RefCountMessage is a base-class for any message intending to do reference counting. Currently it is used for large message removal. Additional validation on reference counting will be done If you set a system property named "ARTEMIS_REF_DEBUG" and enable logging on this class. Additional logging output will be written when reference counting is broken and these debug options are applied.
-
-
Constructor Summary
Constructors Constructor Description RefCountMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcounterString()StringdebugLocations()voiddeferredDebug(String message)Deferred debug, that will be used in case certain conditions apply to the RefCountMessagestatic voiddeferredDebug(Message message, String debugMessage, Object... args)static voiddeferredDebug(RefCountMessage message, String debugMessage, Object... args)voiddisableErrorCheck()intdurableDown()intdurableUp()intgetDurableCount()RefCountMessagegetParentRef()intgetRefCount()intgetUsage()ObjectgetUserContext(Object key)static booleanisRefDebugEnabled()static booleanisRefTraceEnabled()booleanisReleased()has the refCount fired the action already?protected voidonDown()protected voidonUp()intrefDown()intrefUp()protected voidregisterDebug()Sub classes constructors willing to debug reference counts, can register the objectCleaner through this method.protected voidreleaseComplete()protected voidreleased()voidsetParentRef(RefCountMessage origin)voidsetUserContext(Object key, Object value)intusageDown()intusageUp()
-
-
-
Method Detail
-
isRefDebugEnabled
public static boolean isRefDebugEnabled()
-
isRefTraceEnabled
public static boolean isRefTraceEnabled()
-
registerDebug
protected void registerDebug()
Sub classes constructors willing to debug reference counts, can register the objectCleaner through this method.
-
isReleased
public boolean isReleased()
has the refCount fired the action already?
-
debugLocations
public String debugLocations()
-
deferredDebug
public static void deferredDebug(Message message, String debugMessage, Object... args)
-
deferredDebug
public static void deferredDebug(RefCountMessage message, String debugMessage, Object... args)
-
deferredDebug
public void deferredDebug(String message)
Deferred debug, that will be used in case certain conditions apply to the RefCountMessage
-
getRefCount
public int getRefCount()
-
getUsage
public int getUsage()
-
getDurableCount
public int getDurableCount()
-
getParentRef
public RefCountMessage getParentRef()
-
onUp
protected void onUp()
-
released
protected void released()
-
disableErrorCheck
public void disableErrorCheck()
-
onDown
protected void onDown()
-
counterString
protected String counterString()
-
setParentRef
public void setParentRef(RefCountMessage origin)
-
releaseComplete
protected void releaseComplete()
-
usageUp
public int usageUp()
-
usageDown
public int usageDown()
-
durableUp
public int durableUp()
-
durableDown
public int durableDown()
-
refDown
public int refDown()
-
refUp
public int refUp()
-
-