KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > WeakCacheEntryRef


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdo;
13
14 import com.versant.core.jdo.PMCacheEntryOwnerRef;
15 import com.versant.core.common.State;
16 import com.versant.core.jdo.PCStateMan;
17 import com.versant.core.jdo.PMCacheEntry;
18 import com.versant.core.jdo.*;
19 import com.versant.core.common.Debug;
20
21 import java.lang.ref.WeakReference JavaDoc;
22 import java.lang.ref.ReferenceQueue JavaDoc;
23
24 import com.versant.core.common.BindingSupportImpl;
25
26 /**
27  * Keeps a Weak reference to the pm cache entry.
28
29  * @see com.versant.core.jdo.LocalPMCache
30  */

31 public class WeakCacheEntryRef extends WeakReference JavaDoc implements PMCacheEntryOwnerRef {
32     private PMCacheEntry owner;
33
34     public WeakCacheEntryRef(Object JavaDoc referent, ReferenceQueue JavaDoc q, PMCacheEntry owner) {
35         super(referent, q);
36         this.owner = owner;
37     }
38
39     public PMCacheEntry getOwner() {
40         return owner;
41     }
42 }
43
Popular Tags