public final class TransactionTableUpdater
extends java.lang.Object
TransactionManager when a flush
of _Trans metadata VST is needed. This involves dropping the expired records and
creation of new transaction records.| Modifier and Type | Class and Description |
|---|---|
static class |
TransactionTableUpdater.Empty
Dummy empty class to be used as the super class for proxies.
|
private static class |
TransactionTableUpdater.Handler
Invocation handler which delegates calls to the
TransactionTableUpdater.MinimalTrans proxy methods to the
backing DMO instance. |
static interface |
TransactionTableUpdater.MinimalTrans
Interface which defines the minimally required methods of the
MetaTrans
interface. |
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.Class<? extends Record> |
dmoClass
MetaTrans DMO implementation class
|
private TransactionTableUpdater.Handler |
handler
Invocation handler which maps proxy method calls to underlying DMO methods
|
private static CentralLogger |
LOG
Logger
|
private static java.util.Map<java.lang.reflect.Method,java.lang.reflect.Method> |
methodMap
Map of
MinimalTrans methods to MetaTransImpl methods |
private TransactionTableUpdater.MinimalTrans |
proxy
Proxy object for the current metadata transaction DMO
|
private static java.lang.String |
TRANS_TABLE
Metadata transaction table name
|
| Constructor and Description |
|---|
TransactionTableUpdater()
Constructor which stores a persistence object for the associated metadata database, and
initializes a proxy for the application-specific DMO.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush(Persistence p,
java.util.Map<java.lang.Integer,java.lang.Integer> transactions)
Synchronize metadata table with map of transaction IDs to session IDs, creating and
persisting a DMO for each record not already in the table.
|
static boolean |
isEnabled()
Check whether the project was configured with support for
_Trans. |
private static final CentralLogger LOG
private static final java.lang.String TRANS_TABLE
private static final java.lang.Class<? extends Record> dmoClass
private static final java.util.Map<java.lang.reflect.Method,java.lang.reflect.Method> methodMap
MinimalTrans methods to MetaTransImpl methodsprivate final TransactionTableUpdater.MinimalTrans proxy
private final TransactionTableUpdater.Handler handler
public TransactionTableUpdater()
public static boolean isEnabled()
_Trans.true when the project was configured with support for _Trans.public void flush(Persistence p, java.util.Map<java.lang.Integer,java.lang.Integer> transactions)
p - The Persistence to be used when flushing data to database.transactions - The set of active transactions from the current database, mapped by the users
(connection ID) that opened them.