KickJava   Java API By Example, From Geeks To Geeks.

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


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.PCStateMan;
15 import com.versant.core.jdo.PMCacheEntry;
16 import com.versant.core.jdo.PMCacheEntryOwnerRef;
17 import com.versant.core.common.State;
18 import com.versant.core.common.Debug;
19
20 import java.lang.ref.SoftReference JavaDoc;
21 import java.lang.ref.ReferenceQueue JavaDoc;
22
23 import com.versant.core.common.BindingSupportImpl;
24 import com.versant.core.common.State;
25
26 /**
27  * Keeps a Soft reference to the pm cache entry.
28  *
29  * @see com.versant.core.jdo.LocalPMCache
30  */

31 public class SoftCacheEntryRef extends SoftReference JavaDoc implements PMCacheEntryOwnerRef {
32     private PMCacheEntry owner;
33
34     public SoftCacheEntryRef(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