KickJava   Java API By Example, From Geeks To Geeks.

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


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.metadata.ModelMetaData;
15 import com.versant.core.logging.LogEventStore;
16 import com.versant.core.storagemanager.StorageManagerFactory;
17 import com.versant.core.storagemanager.StorageCache;
18
19 import java.util.Properties JavaDoc;
20 import java.util.Map JavaDoc;
21
22 /**
23  * This adds methods to VersantPMF that are for internal use only.
24  */

25 public interface VersantPMFInternal extends 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 JavaDoc 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 JavaDoc 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 JavaDoc 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 }
100
101
Popular Tags