private static class TemporaryDatabaseManager.PrivateTempDbManager extends java.lang.Object implements TemporaryDatabaseManager.TempDbManager
Modifier and Type | Class and Description |
---|---|
private static class |
TemporaryDatabaseManager.PrivateTempDbManager.WorkArea
A class containing context-specific data.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.String> |
perUserTempDatabases
All of the per-user temporary databases initialized by now.
|
private static ContextLocal<TemporaryDatabaseManager.PrivateTempDbManager.WorkArea> |
work
Context local object to manage per-session temporary databases
|
Modifier | Constructor and Description |
---|---|
private |
PrivateTempDbManager() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMyTempDbName()
Retrieve the name of the temporary database used by the current session.
|
void |
initializeMyTempDatabase()
Initialize the current per-session temporary database.
|
boolean |
removeMyTempDatabase()
Remove the current per-session temporary database.
|
private static final java.util.Set<java.lang.String> perUserTempDatabases
private static final ContextLocal<TemporaryDatabaseManager.PrivateTempDbManager.WorkArea> work
public void initializeMyTempDatabase()
DatabaseManager.TEMP_TABLE_DB
is marked as initialized and eventually
cached (see PersistenceFactory.getInstance(Database)
), some per-session
databases may be uninitialized. For this matter, make sure to initialize each
per-session database separately.initializeMyTempDatabase
in interface TemporaryDatabaseManager.TempDbManager
public java.lang.String getMyTempDbName()
getMyTempDbName
in interface TemporaryDatabaseManager.TempDbManager
public boolean removeMyTempDatabase()
removeMyTempDatabase
in interface TemporaryDatabaseManager.TempDbManager
true
if there are no more per-session temporary databases left.
Return true
will indicate the fact that no session needs the temporary
database anymore, so the afferent Database
can be removed from all caches.