01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdo;
12:
13: import com.versant.core.jdo.PCStateMan;
14: import com.versant.core.jdo.PMCacheEntry;
15: import com.versant.core.jdo.PMCacheEntryOwnerRef;
16: import com.versant.core.common.State;
17: import com.versant.core.common.Debug;
18:
19: import java.lang.ref.SoftReference;
20: import java.lang.ref.ReferenceQueue;
21:
22: import com.versant.core.common.BindingSupportImpl;
23: import com.versant.core.common.State;
24:
25: /**
26: * Keeps a Soft reference to the pm cache entry.
27: *
28: * @see com.versant.core.jdo.LocalPMCache
29: */
30: public class SoftCacheEntryRef extends SoftReference implements
31: PMCacheEntryOwnerRef {
32: private PMCacheEntry owner;
33:
34: public SoftCacheEntryRef(Object referent, ReferenceQueue q,
35: PMCacheEntry owner) {
36: super (referent, q);
37: this .owner = owner;
38: }
39:
40: public PMCacheEntry getOwner() {
41: return owner;
42: }
43: }
|