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.PMCacheEntryOwnerRef;
14: import com.versant.core.common.State;
15: import com.versant.core.jdo.PCStateMan;
16: import com.versant.core.jdo.PMCacheEntry;
17: import com.versant.core.jdo.*;
18: import com.versant.core.common.Debug;
19:
20: import java.lang.ref.WeakReference;
21: import java.lang.ref.ReferenceQueue;
22:
23: import com.versant.core.common.BindingSupportImpl;
24:
25: /**
26: * Keeps a Weak reference to the pm cache entry.
27:
28: * @see com.versant.core.jdo.LocalPMCache
29: */
30: public class WeakCacheEntryRef extends WeakReference implements
31: PMCacheEntryOwnerRef {
32: private PMCacheEntry owner;
33:
34: public WeakCacheEntryRef(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: }
|