primaryConnectionFactory
ConnectionFactory primaryConnectionFactory
"Primary" ConnectionFactory, normally used for transactional operations.
ConnectionManager
The "allocateConnection" method can create connections and enlist them (like most normal persistence operations need) or create a connection and return it without enlisting it into a transaction, for example on a read-only operation, or when running non-transactional, or to get schema information.
Connections can be locked per ExecutionContext basis. Locking of connections is used to handle the connection over to the user application. A locked connection denies any further access to the datastore, until the user application unlock it.
(package private) boolean
(package private) final PersistenceNucleusContext
(package private) ConnectionFactory
(package private) Map<ExecutionContext,ManagedConnection>
(package private) ConnectionFactory
(package private) Map<ExecutionContext,ManagedConnection>
(package private) final StoreManager
private ManagedConnection
allocateManagedConnection(boolean primary,
ExecutionContext ec,
Transaction transaction,
Map options)
void
close()
void
private void
configureTransactionEventListener(Transaction transaction,
ManagedConnection mconn)
void
getConnection(boolean primary,
ExecutionContext ec,
Transaction txn)
getConnection(int isolationLevel)
getConnection(ExecutionContext ec,
Map options)
protected ManagedConnection
getManagedConnection(boolean primary,
ExecutionContext ec)
protected void
putManagedConnection(boolean primary,
ExecutionContext ec,
ManagedConnection mconn)
protected void
removeManagedConnection(boolean primary,
ExecutionContext ec)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnection
storeMgr
- Store manager for whom we are managing connectionsConnectionManager
close
in interface ConnectionManager
disableConnectionCaching
in interface ConnectionManager
ConnectionManager
getConnection
in interface ConnectionManager
ec
- execution contextoptions
- connection optionsConnectionManager
getConnection
in interface ConnectionManager
isolationLevel
- Isolation level (-1 implies use the default for the datastore).ConnectionManager
getConnection
in interface ConnectionManager
primary
- Whether to take use the "primary" connection factory, otherwise takes the "secondary"ec
- ExecutionContexttxn
- The TransactionConnectionManager
closeAllConnections
in interface ConnectionManager
ec
- The ExecutionContextprimary
- Whether to use the primary ConnectionFactoryec
- ExecutionContextprimary
- Whether to use the primary ConnectionFactoryec
- ExecutionContextprimary
- Whether to use the primary ConnectionFactoryec
- ExecutionContextmconn
- The ManagedConnectionprimary
- Whether this is the primary connection poolec
- Key in the pooltransaction
- The transactionoptions
- Options for the connection (e.g isolation). These will override those of the txn itselftransaction
- The transaction that we add a listener tomconn
- Managed connection being used