CleanerReference
.@Deprecated public abstract class AutomaticReference<T> extends PhantomReference<T>
Modifier | Constructor and Description |
---|---|
protected |
AutomaticReference(T referent,
Object permit)
Deprecated.
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
Not supported.
|
boolean |
enqueue()
Deprecated.
Not supported.
|
protected abstract void |
free()
Deprecated.
Free this reference.
|
T |
get()
Deprecated.
Always returns
null . |
static Object |
getPermit()
Deprecated.
Get the security authorization permit to create automatic references.
|
boolean |
isEnqueued()
Deprecated.
Determine whether this reference has been enqueued by the garbage collector.
|
protected AutomaticReference(T referent, Object permit)
permit
which was passed in.referent
- the object to monitorpermit
- the permit object originally acquired from getPermit()
public static Object getPermit()
SecurityException
- if a security manager is enabled and the caller does not have the createAutomaticReference
RuntimePermission
public final T get()
null
.get
in class PhantomReference<T>
null
public final void clear()
clear
in class Reference<T>
UnsupportedOperationException
- alwayspublic final boolean isEnqueued()
isEnqueued
in class Reference<T>
true
if the reference has been enqueued, false
otherwisepublic final boolean enqueue()
enqueue
in class Reference<T>
UnsupportedOperationException
- alwaysprotected abstract void free()
Copyright © 2019 JBoss by Red Hat. All rights reserved.