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

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

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

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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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



This
abstract class represents some type of indirect reference to a
referent. get( ) returns the
referent if the reference has not been explicitly cleared by the
clear( ) method or
implicitly cleared by the garbage collector. There are three concrete
subclasses of Reference. The garbage collector
handles these subclasses differently and clears their references
under different circumstances.

Each of the subclasses of
Reference defines a constructor that allows a
ReferenceQueue to be associated with the
Reference object. The garbage collector places
Reference objects onto their associated
ReferenceQueue objects to provide notification
about the state of the referent object. isEnqueued(
)
tests whether a Reference has been
placed on the associated queue, and enqueue( )
explicitly places it on the queue. enqueue( )
returns false if the Reference
object does not have an associated ReferenceQueue,
or if it has already been enqueued.

public abstract class 

Reference<T> {
// No Constructor
// Public Instance Methods
public void

clear ( );
public boolean

enqueue ( );
public T

get ( );
public boolean

isEnqueued ( );
}


Subclasses


PhantomReference,
SoftReference, WeakReference

Returned By


ReferenceQueue.{poll( ), remove(
)}


/ 1191