Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید





This class represents a queue (or linked
list) of Reference objects that have been enqueued
because the garbage collector has determined that the referent
objects to which they refer are no longer adequately reachable. It
serves as a notification system for object-reachability changes. Use
poll( ) to return the first
Reference object on the queue; the method returns
null if the queue is empty. Use remove(
)
to return the first element on the queue, or, if the
queue is empty, to wait for a Reference object to
be enqueued. You can create as many ReferenceQueue
objects as needed. Specify a ReferenceQueue for a
Reference object by passing it to the
SoftReference( ), WeakReference(
)
, or PhantomReference( ) constructor.

A ReferenceQueue is
required to use PhantomReference objects. It is
optional with SoftReference and
WeakReference objects; for these classes, the
get( ) method returns null if
the referent object is no longer adequately reachable.

public class 

ReferenceQueue<T> {
// Public Constructors
public

ReferenceQueue ( );
// Public Instance Methods
public Reference<? extends T>

poll ( );
public Reference<? extends T>

remove ( ) throws InterruptedException;
public Reference<? extends T>

remove (long

timeout ) throws IllegalArgumentException,
InterruptedException;
}


Passed To


PhantomReference.PhantomReference( ),
SoftReference.SoftReference( ),
WeakReference.WeakReference( )


/ 1191