Package org.apache.camel.util
Class ReferenceCount
java.lang.Object
org.apache.camel.util.ReferenceCount
-
Method Summary
Modifier and TypeMethodDescriptionlong
get()
Returns the reference count.static ReferenceCount
static ReferenceCount
void
release()
Decreases the reference count and invoke onRelease if the reference count reaches0
.void
retain()
Increases the reference count invoke onFirst on the first increment;
-
Method Details
-
get
Returns the reference count. -
retain
Increases the reference count invoke onFirst on the first increment;- Throws:
IllegalStateException
-
release
Decreases the reference count and invoke onRelease if the reference count reaches0
.- Throws:
IllegalStateException
-
on
-
onRelease
-