public class V10Transaction extends AbstractFbTransaction implements FbWireTransaction
FbTransaction
implementation for the version 10 wire protocol.exceptionListenerDispatcher, transactionListenerDispatcher
Constructor and Description |
---|
V10Transaction(FbWireDatabase database,
int transactionHandle,
TransactionState initialState)
Creates a new instance of V10Transaction for the specified database.
|
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit the transaction
|
protected FbWireDatabase |
getDatabase() |
int |
getHandle() |
byte[] |
getTransactionInfo(byte[] requestItems,
int maxBufferLength)
Performs a transaction info request.
|
protected XdrOutputStream |
getXdrOut() |
void |
prepare(byte[] recoveryInformation)
Prepare the transaction for two-phase commit/rollback.
|
void |
rollback()
Roll back the transaction
|
addExceptionListener, addTransactionListener, addWeakTransactionListener, finalize, getState, getSynchronizationObject, getTransactionId, getTransactionInfo, removeExceptionListener, removeTransactionListener, switchState
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addTransactionListener, addWeakTransactionListener, getState, getTransactionId, getTransactionInfo, removeTransactionListener
addExceptionListener, removeExceptionListener
public V10Transaction(FbWireDatabase database, int transactionHandle, TransactionState initialState)
This can either be used for an active handle (with initialState
TransactionState.ACTIVE
),
or a reconnected (prepared) handle (with initialState
TransactionState.PREPARED
).
database
- FbWireDatabase implementationtransactionHandle
- Transaction handleinitialState
- The initial state of the transaction (only ACTIVE
or PREPARED
allowed).protected final XdrOutputStream getXdrOut() throws java.sql.SQLException
java.sql.SQLException
protected FbWireDatabase getDatabase()
getDatabase
in class AbstractFbTransaction
public int getHandle()
getHandle
in interface FbTransaction
public void commit() throws java.sql.SQLException
FbTransaction
commit
in interface FbTransaction
java.sql.SQLException
public void rollback() throws java.sql.SQLException
FbTransaction
rollback
in interface FbTransaction
java.sql.SQLException
public void prepare(byte[] recoveryInformation) throws java.sql.SQLException
FbTransaction
prepare
in interface FbTransaction
recoveryInformation
- Transaction recovery information (stored in RDB$TRANSACTION_DESCRIPTION of RDB$TRANSACTIONS),
or null
to prepare without recovery information.java.sql.SQLException
public byte[] getTransactionInfo(byte[] requestItems, int maxBufferLength) throws java.sql.SQLException
FbTransaction
getTransactionInfo
in interface FbTransaction
requestItems
- Information items to requestmaxBufferLength
- Maximum response buffer length to usemaxBufferLength
java.sql.SQLException
- For errors retrieving the information.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.