10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.ref;
27
28 import jdk.internal.vm.annotation.ForceInline;
29 import jdk.internal.HotSpotIntrinsicCandidate;
30 import jdk.internal.misc.JavaLangRefAccess;
31 import jdk.internal.misc.SharedSecrets;
32 import jdk.internal.ref.Cleaner;
33
34 /**
35 * Abstract base class for reference objects. This class defines the
36 * operations common to all reference objects. Because reference objects are
37 * implemented in close cooperation with the garbage collector, this class may
38 * not be subclassed directly.
39 *
40 * @author Mark Reinhold
41 * @since 1.2
42 */
43
44 public abstract class Reference<T> {
45
46 /* The state of a Reference object is characterized by two attributes. It
47 * may be either "active", "pending", or "inactive". It may also be
48 * either "registered", "enqueued", "dequeued", or "unregistered".
49 *
50 * Active: Subject to special treatment by the garbage collector. Some
51 * time after the collector detects that the reachability of the
|
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.ref;
27
28 import jdk.internal.vm.annotation.ForceInline;
29 import jdk.internal.HotSpotIntrinsicCandidate;
30 import jdk.internal.access.JavaLangRefAccess;
31 import jdk.internal.access.SharedSecrets;
32 import jdk.internal.ref.Cleaner;
33
34 /**
35 * Abstract base class for reference objects. This class defines the
36 * operations common to all reference objects. Because reference objects are
37 * implemented in close cooperation with the garbage collector, this class may
38 * not be subclassed directly.
39 *
40 * @author Mark Reinhold
41 * @since 1.2
42 */
43
44 public abstract class Reference<T> {
45
46 /* The state of a Reference object is characterized by two attributes. It
47 * may be either "active", "pending", or "inactive". It may also be
48 * either "registered", "enqueued", "dequeued", or "unregistered".
49 *
50 * Active: Subject to special treatment by the garbage collector. Some
51 * time after the collector detects that the reachability of the
|