public class TemporaryDatabaseManager
extends java.lang.Object
DatabaseManager.TEMP_TABLE_DB
. The temporary database should be
considered as per-session only in this manager in order to avoid leakage.Modifier and Type | Class and Description |
---|---|
private static class |
TemporaryDatabaseManager.PrivateTempDbManager
Manager used for handling operations on multiple private temporary databases.
|
private static class |
TemporaryDatabaseManager.SharedTempDbManager
Manager used for handling operations on a single shared temporary database.
|
private static interface |
TemporaryDatabaseManager.TempDbManager
Used for defining a delegate responsible for managing the temporary databases.
|
Modifier and Type | Field and Description |
---|---|
private static TemporaryDatabaseManager.TempDbManager |
delegate
Responsible for handling the operations on the temporary database
|
private static Dialect |
dialect
The dialect used for the temporary databases.
|
private static boolean |
initialized
Flag indicating manager has been initialized
|
private static java.util.logging.Logger |
log
Logger
|
Constructor and Description |
---|
TemporaryDatabaseManager() |
Modifier and Type | Method and Description |
---|---|
(package private) static Dialect |
getMyTempDbDialect()
Retrieve the dialect used for the current per-session temporary database.
|
private static java.lang.String |
getMyTempDbName()
Retrieve the name of the temporary database used by the current session.
|
static Settings |
getMyTempDbSettings()
Retrieve the URL used for the connection to
DatabaseManager.TEMP_TABLE_DB temporary
database. |
(package private) static void |
initialize()
Select a suitable delegate for handling the operations on the temporary database.
|
(package private) static void |
initializeMyTempDatabase()
Initialize the current temporary database.
|
(package private) static boolean |
removeMyTempDatabase()
Remove the current temporary database.
|
private static Dialect dialect
private static boolean initialized
private static TemporaryDatabaseManager.TempDbManager delegate
private static final java.util.logging.Logger log
public static Settings getMyTempDbSettings()
DatabaseManager.TEMP_TABLE_DB
temporary
database.static void initialize()
static void initializeMyTempDatabase()
static Dialect getMyTempDbDialect()
static boolean removeMyTempDatabase()
true
if the associated Database
can be removed as well.
If true
is returned, PersistenceFactory.remove(Database)
will remove the temporary database from the cache.private static java.lang.String getMyTempDbName()