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.metadata.ModelMetaData;
14: import com.versant.core.logging.LogEventStore;
15: import com.versant.core.storagemanager.StorageManagerFactory;
16: import com.versant.core.storagemanager.StorageCache;
17:
18: import java.util.Properties;
19: import java.util.Map;
20:
21: /**
22: * This adds methods to VersantPMF that are for internal use only.
23: */
24: public interface VersantPMFInternal extends
25: VersantPersistenceManagerFactory {
26:
27: /**
28: * Create a new, unconfigured, PM. This is used by the pool to create
29: * new PMs.
30: */
31: public VersantPersistenceManagerImp createVersantPersistenceManagerImp();
32:
33: /**
34: * This is called by VersantPersistenceManagerImp when it is closed.
35: *
36: * @param fromFinalizer True if the PM was closed automatically by its
37: * finalizer
38: */
39: public void pmClosedNotification(VersantPersistenceManagerImp pm,
40: boolean fromFinalizer, boolean txWasActive);
41:
42: /**
43: * Get the meta data.
44: */
45: public ModelMetaData getJDOMetaData();
46:
47: /**
48: * Get the event store.
49: */
50: public LogEventStore getLogEventStore();
51:
52: /**
53: * Get the properties that we were created from.
54: */
55: public Properties getInitProperties();
56:
57: /**
58: * Get our StorageManagerFactory.
59: */
60: public StorageManagerFactory getStorageManagerFactory();
61:
62: /**
63: * Get the bytecode for the hypedrive classes or null if hyperdrive is
64: * not in use. The map maps class name -> byte[] or null if the class was
65: * not generated at runtime (i.e. loaded from our classloader). Each byte[]
66: * is compressed with gzip to save memory.
67: *
68: * @see #getHyperdriveBytecodeMaxSize()
69: */
70: public Map getHyperdriveBytecode();
71:
72: /**
73: * Get the maximum decompressed size of the bytecode for any of the
74: * hyperdrive classes. This can be used to size a decompression buffer.
75: */
76: public int getHyperdriveBytecodeMaxSize();
77:
78: /**
79: * Get the classloader we are using.
80: */
81: public ClassLoader getClassLoader();
82:
83: /**
84: * Export this PMF to remote clients using pmfServer. Note that init
85: * and start are not called on the added pmfServer. Only its close
86: * method is called when the PMF is closed.
87: */
88: public void addPMFServer(PMFServer pmfServer);
89:
90: /**
91: * If Local pmf.
92: */
93: boolean isLocal();
94:
95: /**
96: * Return the level 2 cache.
97: */
98: StorageCache getStorageCache();
99: }
|