public class PersistenceManagerProvider extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clearOutPmfClassLoaderCache()
Removed cached classloaders from DataNucleus
DataNucleus caches classloaders in NucleusContext.
|
static void |
closePmfIfNeeded(boolean forCompactor,
boolean shouldClose)
Close the corresponding PersistenceManagerFactory
|
static void |
closePmfInternal(javax.jdo.PersistenceManagerFactory pmf)
When closing PersistenceManagerFactory, the connection factory should be closed as well,
otherwise the underlying dangling connections would be accumulated resulting to connection leaks.
|
static javax.jdo.PersistenceManager |
getPersistenceManager()
creates a PersistenceManager instance for the current PersistenceManagerFactory.
|
static javax.jdo.PersistenceManager |
getPersistenceManager(boolean forCompactor) |
static String |
getProperty(String key) |
static void |
setTwoMetastoreTesting(boolean twoMetastoreTesting)
To make possible to run multiple metastore in unit test
|
static void |
updatePmfProperties(org.apache.hadoop.conf.Configuration conf)
This method updates the PersistenceManagerFactory and its properties if the given
configuration is different from its current set of properties.
|
public static void closePmfInternal(javax.jdo.PersistenceManagerFactory pmf)
pmf - the PersistenceManagerFactory tended to be closedpublic static void closePmfIfNeeded(boolean forCompactor,
boolean shouldClose)
forCompactor - true for compactorPmf, otherwise pmfshouldClose - close the PersistenceManagerFactory if truepublic static void updatePmfProperties(org.apache.hadoop.conf.Configuration conf)
conf - Configuration which provides the datanucleus/datasource properties for comparisonpublic static void clearOutPmfClassLoaderCache()
public static javax.jdo.PersistenceManager getPersistenceManager()
public static javax.jdo.PersistenceManager getPersistenceManager(boolean forCompactor)
public static void setTwoMetastoreTesting(boolean twoMetastoreTesting)
twoMetastoreTesting - if we are using multiple metastore in unit testCopyright © 2024 The Apache Software Foundation. All rights reserved.