public final class Ref<T> extends java.lang.Object implements RefCounted<T>
RefCounted.Tidy
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_ENABLED |
Constructor and Description |
---|
Ref(T referent,
RefCounted.Tidy tidy) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
ensureReleased() |
java.lang.Throwable |
ensureReleased(java.lang.Throwable accumulate) |
T |
get() |
int |
globalCount()
A convenience method for reporting:
|
java.lang.String |
printDebugInfo() |
Ref<T> |
ref() |
void |
release()
Must be called exactly once, when the logical operation for which this Ref was created has terminated.
|
Ref<T> |
tryRef() |
public Ref(T referent, RefCounted.Tidy tidy)
public void release()
public java.lang.Throwable ensureReleased(java.lang.Throwable accumulate)
public void ensureReleased()
public void close()
public T get()
public Ref<T> tryRef()
tryRef
in interface RefCounted<T>
public Ref<T> ref()
ref
in interface RefCounted<T>
public java.lang.String printDebugInfo()
public int globalCount()
Copyright © 2018 The Apache Software Foundation