KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > WeakObjectReference


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object;
5
6 import java.lang.ref.ReferenceQueue JavaDoc;
7 import java.lang.ref.WeakReference JavaDoc;
8
9 /**
10  * @author steve
11  */

12 public class WeakObjectReference extends WeakReference JavaDoc {
13   private final ObjectID id;
14
15   public WeakObjectReference(ObjectID id, Object JavaDoc referent) {
16     super(referent);
17     this.id = id;
18   }
19
20   public WeakObjectReference(ObjectID id, Object JavaDoc referent, ReferenceQueue JavaDoc q) {
21     super(referent, q);
22     this.id = id;
23   }
24
25   public ObjectID getObjectID() {
26     return id;
27   }
28 }
Popular Tags