Class V10Transaction
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractFbTransaction
- 
- org.firebirdsql.gds.ng.wire.version10.V10Transaction
 
 
- 
- All Implemented Interfaces:
- FbTransaction,- ExceptionListenable,- FbWireTransaction
 
 public class V10Transaction extends AbstractFbTransaction implements FbWireTransaction FbTransactionimplementation for the version 10 wire protocol.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field Summary- 
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbTransactionexceptionListenerDispatcher, transactionListenerDispatcher
 
- 
 - 
Constructor SummaryConstructors Constructor Description V10Transaction(FbWireDatabase database, int transactionHandle, TransactionState initialState)Creates a new instance of V10Transaction for the specified database.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()Commit the transactionprotected FbWireDatabasegetDatabase()intgetHandle()byte[]getTransactionInfo(byte[] requestItems, int maxBufferLength)Performs a transaction info request.protected XdrOutputStreamgetXdrOut()voidprepare(byte[] recoveryInformation)Prepare the transaction for two-phase commit/rollback.voidrollback()Roll back the transaction- 
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbTransactionaddExceptionListener, addTransactionListener, addWeakTransactionListener, finalize, getState, getSynchronizationObject, getTransactionId, getTransactionInfo, removeExceptionListener, removeTransactionListener, switchState
 - 
Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenableaddExceptionListener, removeExceptionListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbTransactionaddTransactionListener, addWeakTransactionListener, getState, getTransactionId, getTransactionInfo, removeTransactionListener
 
- 
 
- 
- 
- 
Constructor Detail- 
V10Transactionpublic V10Transaction(FbWireDatabase database, int transactionHandle, TransactionState initialState) Creates a new instance of V10Transaction for the specified database.This can either be used for an active handle (with initialStateTransactionState.ACTIVE), or a reconnected (prepared) handle (withinitialStateTransactionState.PREPARED).- Parameters:
- database- FbWireDatabase implementation
- transactionHandle- Transaction handle
- initialState- The initial state of the transaction (only- ACTIVEor- PREPAREDallowed).
 
 
- 
 - 
Method Detail- 
getXdrOutprotected final XdrOutputStream getXdrOut() throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
getDatabaseprotected FbWireDatabase getDatabase() - Overrides:
- getDatabasein class- AbstractFbTransaction
 
 - 
getHandlepublic int getHandle() - Specified by:
- getHandlein interface- FbTransaction
- Returns:
- The Firebird transaction handle identifier
 
 - 
commitpublic void commit() throws java.sql.SQLExceptionDescription copied from interface:FbTransactionCommit the transaction- Specified by:
- commitin interface- FbTransaction
- Throws:
- java.sql.SQLException
 
 - 
rollbackpublic void rollback() throws java.sql.SQLExceptionDescription copied from interface:FbTransactionRoll back the transaction- Specified by:
- rollbackin interface- FbTransaction
- Throws:
- java.sql.SQLException
 
 - 
preparepublic void prepare(byte[] recoveryInformation) throws java.sql.SQLExceptionDescription copied from interface:FbTransactionPrepare the transaction for two-phase commit/rollback.- Specified by:
- preparein interface- FbTransaction
- Parameters:
- recoveryInformation- Transaction recovery information (stored in RDB$TRANSACTION_DESCRIPTION of RDB$TRANSACTIONS), or- nullto prepare without recovery information.
- Throws:
- java.sql.SQLException
 
 - 
getTransactionInfopublic byte[] getTransactionInfo(byte[] requestItems, int maxBufferLength) throws java.sql.SQLExceptionDescription copied from interface:FbTransactionPerforms a transaction info request.- Specified by:
- getTransactionInfoin interface- FbTransaction
- Parameters:
- requestItems- Information items to request
- maxBufferLength- Maximum response buffer length to use
- Returns:
- The response buffer (note: length is the actual length of the
 response, not maxBufferLength
- Throws:
- java.sql.SQLException- For errors retrieving the information.
 
 
- 
 
-