public class JdbcCoordinatorImpl extends Object implements JdbcCoordinator
JdbcCoordinator
IMPL NOTE : Custom serialization handling!Constructor and Description |
---|
JdbcCoordinatorImpl(Connection userSuppliedConnection,
TransactionCoordinatorImpl transactionCoordinator) |
Modifier and Type | Method and Description |
---|---|
void |
abortBatch()
Abort the currently managed batch (if any)
|
void |
afterDeserialize(TransactionCoordinatorImpl transactionCoordinator) |
void |
afterTransaction()
Signals the end of transaction.
|
protected BatchBuilder |
batchBuilder() |
void |
cancelLastQuery()
Attempt to cancel the last query sent to the JDBC driver.
|
Connection |
close()
Close this coordinator and release and resources.
|
<T> T |
coordinateWork(WorkExecutorVisitable<T> work)
Perform the requested work handling exceptions, coordinating and handling return processing.
|
static JdbcCoordinatorImpl |
deserialize(ObjectInputStream ois,
TransactionContext transactionContext) |
int |
determineRemainingTransactionTimeOutPeriod()
Calculate the amount of time, in seconds, still remaining before transaction timeout occurs.
|
void |
executeBatch()
Execute the currently managed batch (if any)
|
void |
flushBeginning()
Callback to let us know that a flush is beginning.
|
void |
flushEnding()
Callback to let us know that a flush is ending.
|
Batch |
getBatch(BatchKey key)
Get a batch instance.
|
LogicalConnectionImplementor |
getLogicalConnection()
Retrieves the logical connection associated with this JDBC coordinator.
|
StatementPreparer |
getStatementPreparer()
Obtain the statement preparer associated with this JDBC coordinator.
|
TransactionCoordinator |
getTransactionCoordinator()
Retrieve the transaction coordinator associated with this JDBC coordinator.
|
void |
serialize(ObjectOutputStream oos) |
protected SessionFactoryImplementor |
sessionFactory() |
void |
setTransactionTimeOut(int seconds)
Set the effective transaction timeout period for the current transaction, in seconds.
|
protected TransactionEnvironment |
transactionEnvironment() |
public JdbcCoordinatorImpl(Connection userSuppliedConnection, TransactionCoordinatorImpl transactionCoordinator)
public TransactionCoordinator getTransactionCoordinator()
JdbcCoordinator
getTransactionCoordinator
in interface JdbcCoordinator
public LogicalConnectionImplementor getLogicalConnection()
JdbcCoordinator
getLogicalConnection
in interface JdbcCoordinator
protected TransactionEnvironment transactionEnvironment()
protected SessionFactoryImplementor sessionFactory()
protected BatchBuilder batchBuilder()
public void flushBeginning()
JdbcCoordinator
JdbcCoordinator.flushEnding()
flushBeginning
in interface JdbcCoordinator
public void flushEnding()
JdbcCoordinator
flushEnding
in interface JdbcCoordinator
public Connection close()
JdbcCoordinator
close
in interface JdbcCoordinator
Connection
associated with the managed logical connection
LogicalConnection.close()
public Batch getBatch(BatchKey key)
JdbcCoordinator
getBatch
in interface JdbcCoordinator
key
- The unique batch key.public void executeBatch()
JdbcCoordinator
executeBatch
in interface JdbcCoordinator
public void abortBatch()
JdbcCoordinator
abortBatch
in interface JdbcCoordinator
public StatementPreparer getStatementPreparer()
JdbcCoordinator
getStatementPreparer
in interface JdbcCoordinator
public void setTransactionTimeOut(int seconds)
JdbcCoordinator
setTransactionTimeOut
in interface JdbcCoordinator
seconds
- The number of seconds before a time out should occur.public int determineRemainingTransactionTimeOutPeriod()
JdbcCoordinator
determineRemainingTransactionTimeOutPeriod
in interface JdbcCoordinator
public void afterTransaction()
JdbcCoordinator
afterTransaction
in interface JdbcCoordinator
public <T> T coordinateWork(WorkExecutorVisitable<T> work)
JdbcCoordinator
coordinateWork
in interface JdbcCoordinator
T
- The result type.work
- The work to be performed.public void cancelLastQuery()
JdbcCoordinator
cancelLastQuery
in interface JdbcCoordinator
public void serialize(ObjectOutputStream oos) throws IOException
IOException
public static JdbcCoordinatorImpl deserialize(ObjectInputStream ois, TransactionContext transactionContext) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void afterDeserialize(TransactionCoordinatorImpl transactionCoordinator)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.