JdbcCoordinator
IMPL NOTE : Custom serialization handling!
| Modifier and Type | Field and Description |
|---|---|
| private transient Batch | |
| private int | |
| private final boolean | |
| private transient JdbcServices | |
| private Statement | |
| private static final CoreMessageLogger | |
| private transient LogicalConnectionImplementor | |
| private transient JdbcSessionOwner | |
| private boolean | releasesEnabled
If true, manually (and temporarily) circumvent aggressive release processing. |
| private transient ResultSetReturn | |
| private transient StatementPreparer | |
| private transient long |
| Access | Constructor and Description |
|---|---|
| public | JdbcCoordinatorImpl(Connection
The user supplied connection (may be null) userSuppliedConnection, JdbcSessionOwner owner, JdbcServices jdbcServices)Constructs a JdbcCoordinatorImpl |
| private | JdbcCoordinatorImpl(LogicalConnectionImplementor logicalConnection, boolean isUserSuppliedConnection, JdbcSessionOwner owner)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | abortBatch()
Implements org. |
| public void | afterStatementExecution()
Implements org. |
| public void | afterTransaction()
Implements org. |
| public void | afterTransactionBegin()
Implements org. |
| public void | afterTransactionCompletion(boolean
Was the transaction successful? successful, boolean Is this delayed after transaction completion call (aka after a timeout)? delayed)Implements org. |
| protected BatchBuilder | |
| public void | beforeTransactionCompletion()
Implements org. |
| public void | cancelLastQuery()
Implements org. |
| public Connection | close()
Implements org. |
| protected void | |
| protected void | |
| public <T> T | coordinateWork(WorkExecutorVisitable<T>
The work to be performed. work)Implements org. |
| public static JdbcCoordinatorImpl | Returns: The deserialized JdbcCoordinatorImplThe stream into which to write our state ois, JdbcSessionOwner The Jdbc Session owner which owns the JdbcCoordinatorImpl to be deserialized. owner)JDK deserialization hook |
| private ConnectionReleaseMode | determineConnectionReleaseMode(JdbcConnectionAccess jdbcConnectionAccess, boolean isUserSuppliedConnection, ConnectionReleaseMode connectionReleaseMode)
|
| public int | determineRemainingTransactionTimeOutPeriod()
Implements org. |
| public void | disableReleases()
Implements org. |
| public void | enableReleases()
Implements org. |
| public void | executeBatch()
Implements org. |
| public void | |
| public void | flushBeginning()
Implements org. |
| public void | flushEnding()
Implements org. |
| public Batch | getBatch(BatchKey
The unique batch key. key)Implements org. |
| public JdbcSessionOwner | |
| public LogicalConnectionImplementor | getLogicalConnection()
Implements org. |
| public JdbcResourceTransaction | getResourceLocalTransaction()
Provides access to the resource local transaction of this data store, which is used by the TransactionCoordinator
to manage transactions against the data store when not using JTA.
|
| public ResultSetReturn | getResultSetReturn()
Implements org. |
| public StatementPreparer | getStatementPreparer()
Implements org. |
| private boolean | |
| public boolean | isActive()
Implements org. |
| public boolean | isReadyForSerialization()
Implements org. |
| public void | registerLastQuery(Statement
The cancel-able query statement. statement)Implements org. |
| private void | |
| public void | serialize(ObjectOutputStream
The stream into which to write our state oos)Implements org. |
| protected SessionFactoryImplementor | |
| public void | setTransactionTimeOut(int
The number of seconds before a time out should occur. seconds)Implements org. |
| public SqlExceptionHelper |
| currentBatch | back to summary |
|---|---|
| private transient Batch currentBatch | |
| flushDepth | back to summary |
|---|---|
| private int flushDepth | |
| isUserSuppliedConnection | back to summary |
|---|---|
| private final boolean isUserSuppliedConnection | |
| jdbcServices | back to summary |
|---|---|
| private transient JdbcServices jdbcServices | |
| lastQuery | back to summary |
|---|---|
| private Statement lastQuery | |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| logicalConnection | back to summary |
|---|---|
| private transient LogicalConnectionImplementor logicalConnection | |
| owner | back to summary |
|---|---|
| private transient JdbcSessionOwner owner | |
| releasesEnabled | back to summary |
|---|---|
| private boolean releasesEnabled If true, manually (and temporarily) circumvent aggressive release processing. | |
| resultSetExtractor | back to summary |
|---|---|
| private transient ResultSetReturn resultSetExtractor | |
| statementPreparer | back to summary |
|---|---|
| private transient StatementPreparer statementPreparer | |
| transactionTimeOutInstant | back to summary |
|---|---|
| private transient long transactionTimeOutInstant | |
| JdbcCoordinatorImpl | back to summary |
|---|---|
| public JdbcCoordinatorImpl(Connection userSuppliedConnection, JdbcSessionOwner owner, JdbcServices jdbcServices) Constructs a JdbcCoordinatorImpl
| |
| JdbcCoordinatorImpl | back to summary |
|---|---|
| private JdbcCoordinatorImpl(LogicalConnectionImplementor logicalConnection, boolean isUserSuppliedConnection, JdbcSessionOwner owner) | |
| abortBatch | back to summary |
|---|---|
| public void abortBatch() Implements org. Doc from org. Abort the currently managed batch (if any)
| |
| afterStatementExecution | back to summary |
|---|---|
| public void afterStatementExecution() Implements org. Doc from org. Used to signify that a statement has completed execution which may indicate that this logical connection need to perform an aggressive release of its physical connection.
| |
| afterTransaction | back to summary |
|---|---|
| public void afterTransaction() Implements org. Doc from org. Signals the end of transaction. Intended for use from the transaction coordinator, after local transaction completion. Used to conditionally release the JDBC connection aggressively if the configured release mode indicates.
| |
| afterTransactionBegin | back to summary |
|---|---|
| public void afterTransactionBegin() Implements org. Doc from org. A after-begin callback from the coordinator to its owner.
| |
| afterTransactionCompletion | back to summary |
|---|---|
| public void afterTransactionCompletion(boolean successful, boolean delayed) Implements org. Doc from org. An after-completion callback from the coordinator to its owner.
| |
| batchBuilder | back to summary |
|---|---|
| protected BatchBuilder batchBuilder() | |
| beforeTransactionCompletion | back to summary |
|---|---|
| public void beforeTransactionCompletion() Implements org. Doc from org. A before-completion callback from the coordinator to its owner.
| |
| cancelLastQuery | back to summary |
|---|---|
| public void cancelLastQuery() Implements org. Doc from org. Attempt to cancel the last query sent to the JDBC driver.
| |
| close | back to summary |
|---|---|
| public Connection close() Implements org. Doc from org. Close this coordinator and release and resources.
| |
| close | back to summary |
|---|---|
protected void close(Statement statement)
| |
| close | back to summary |
|---|---|
protected void close(ResultSet resultSet)
| |
| coordinateWork | back to summary |
|---|---|
| public <T> T coordinateWork(WorkExecutorVisitable<T> work) Implements org. Doc from org. Perform the requested work handling exceptions, coordinating and handling return processing.
| |
| deserialize | back to summary |
|---|---|
| public static JdbcCoordinatorImpl deserialize(ObjectInputStream ois, JdbcSessionOwner owner) throws IOException, ClassNotFoundException JDK deserialization hook
| |
| determineConnectionReleaseMode | back to summary |
|---|---|
| private ConnectionReleaseMode determineConnectionReleaseMode(JdbcConnectionAccess jdbcConnectionAccess, boolean isUserSuppliedConnection, ConnectionReleaseMode connectionReleaseMode) | |
| determineRemainingTransactionTimeOutPeriod | back to summary |
|---|---|
| public int determineRemainingTransactionTimeOutPeriod() Implements org. Doc from org. Calculate the amount of time, in seconds, still remaining before transaction timeout occurs.
| |
| disableReleases | back to summary |
|---|---|
| public void disableReleases() Implements org. Doc from org. Disable connection releases
| |
| enableReleases | back to summary |
|---|---|
| public void enableReleases() Implements org. Doc from org. Enable connection releases
| |
| executeBatch | back to summary |
|---|---|
| public void executeBatch() Implements org. Doc from org. Execute the currently managed batch (if any)
| |
| flushBeforeTransactionCompletion | back to summary |
|---|---|
| public void flushBeforeTransactionCompletion() Implements org.
| |
| flushBeginning | back to summary |
|---|---|
| public void flushBeginning() Implements org. Doc from org. Callback to let us know that a flush is beginning. We use this fact
to temporarily circumvent aggressive connection releasing until after
the flush cycle is complete
| |
| flushEnding | back to summary |
|---|---|
| public void flushEnding() Implements org. Doc from org. Callback to let us know that a flush is ending. We use this fact to stop circumventing aggressive releasing connections.
| |
| getBatch | back to summary |
|---|---|
| public Batch getBatch(BatchKey key) Implements org. Doc from org. Get a batch instance. | |
| getJdbcSessionOwner | back to summary |
|---|---|
| public JdbcSessionOwner getJdbcSessionOwner() Implements org.
| |
| getLogicalConnection | back to summary |
|---|---|
| public LogicalConnectionImplementor getLogicalConnection() Implements org. Doc from org. Retrieves the logical connection associated with this JDBC coordinator.
| |
| getResourceLocalTransaction | back to summary |
|---|---|
| public JdbcResourceTransaction getResourceLocalTransaction() Provides access to the resource local transaction of this data store, which is used by the TransactionCoordinator to manage transactions against the data store when not using JTA.
| |
| getResultSetReturn | back to summary |
|---|---|
| public ResultSetReturn getResultSetReturn() Implements org. Doc from org. Obtain the resultset extractor associated with this JDBC coordinator.
| |
| getStatementPreparer | back to summary |
|---|---|
| public StatementPreparer getStatementPreparer() Implements org. Doc from org. Obtain the statement preparer associated with this JDBC coordinator.
| |
| hasRegisteredResources | back to summary |
|---|---|
| private boolean hasRegisteredResources() | |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements org. Doc from org. Is the TransactionCoordinator owner considered active?
| |
| isReadyForSerialization | back to summary |
|---|---|
| public boolean isReadyForSerialization() Implements org. Doc from org. Can this coordinator be serialized?
| |
| registerLastQuery | back to summary |
|---|---|
| public void registerLastQuery(Statement statement) Implements org. Doc from org. Register a query statement as being able to be cancelled.
| |
| releaseResources | back to summary |
|---|---|
| private void releaseResources() | |
| serialize | back to summary |
|---|---|
| public void serialize(ObjectOutputStream oos) throws IOException Implements org. JDK serialization hook
| |
| sessionFactory | back to summary |
|---|---|
| protected SessionFactoryImplementor sessionFactory()
Deprecated as a consequence of | |
| setTransactionTimeOut | back to summary |
|---|---|
| public void setTransactionTimeOut(int seconds) Implements org. Doc from org. Set the effective transaction timeout period for the current transaction, in seconds.
| |
| sqlExceptionHelper | back to summary |
|---|---|
| public SqlExceptionHelper sqlExceptionHelper() Access to the SqlExceptionHelper
| |