/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds this reference object to the queue with which it is registered, * if any. * * <p> This method is invoked only by Java code; when the garbage collector * enqueues references it does so directly, without invoking this method. * * @return <code>true</code> if this reference object was successfully * enqueued; <code>false</code> if it was already enqueued or if * it was not registered with a queue when it was created */ public boolean enqueue() { return this.queue.enqueue(this); }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds this reference object to the queue with which it is registered, * if any. * * <p> This method is invoked only by Java code; when the garbage collector * enqueues references it does so directly, without invoking this method. * * @return <code>true</code> if this reference object was successfully * enqueued; <code>false</code> if it was already enqueued or if * it was not registered with a queue when it was created */ public boolean enqueue() { return this.queue.enqueue(this); }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }
/** * Adds an object to its reference queue. * * @return {@code true} if this call has caused the {@code Reference} to * become enqueued, or {@code false} otherwise * * @hide */ public final synchronized boolean enqueueInternal() { if (queue != null && queueNext == null) { queue.enqueue(this); queue = null; return true; } return false; }