public final class ReferenceCount extends Object
| Modifier and Type | Method and Description |
|---|---|
long |
get()
Returns the reference count.
|
static ReferenceCount |
on(Runnable onFirst,
Runnable onRelease) |
static ReferenceCount |
onRelease(Runnable onRelease) |
void |
release()
Decreases the reference count and invoke onRelease if the reference count reaches
0. |
void |
retain()
Increases the reference count invoke onFirst on the first increment;
|
public long get()
public void retain() throws IllegalStateException
IllegalStateExceptionpublic void release() throws IllegalStateException
0.IllegalStateExceptionpublic static ReferenceCount on(Runnable onFirst, Runnable onRelease)
public static ReferenceCount onRelease(Runnable onRelease)
Apache Camel