Module org.firebirdsql.jaybird
Package org.firebirdsql.jdbc

# Class InternalTransactionCoordinator.AbstractTransactionCoordinator

java.lang.Object
org.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator

All Implemented Interfaces:
  `FBObjectListener.BlobListener`, `FBObjectListener.StatementListener`

Enclosing class:
  InternalTransactionCoordinator

public abstract static class InternalTransactionCoordinator.AbstractTransactionCoordinator extends Object implements FBObjectListener.StatementListener, FBObjectListener.BlobListener
Transaction coordinator base implementation.

This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final FBConnection`
`connection`
`protected final FBLocalTransaction`
`localTransaction`
`protected final Collection<AbstractStatement>`
`statements`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractTransactionCoordinator(FBConnection connection, FBLocalTransaction localTransaction)`

## Method Summary

Modifier and Type
Method
Description
`abstract void`
`commit()`
`protected void`
`completeStatements(CompletionReason reason)`
`void`
`ensureTransaction()`
`final FBConnection`
`getConnection()`
Get the connection which owns this coordinator.
`protected final Collection<AbstractStatement>`
`getStatements()`
`abstract void`
`rollback()`
`protected final void`
`setStatements(Collection<AbstractStatement> statements)`
`final void`
`statementCompleted(AbstractStatement stmt)`
Notify the listener that statement is completed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.firebirdsql.jdbc.FBObjectListener.BlobListener

`executionCompleted, executionStarted`

### Methods inherited from interface org.firebirdsql.jdbc.FBObjectListener.StatementListener

`executionStarted, statementClosed, statementCompleted`

## Field Details

### localTransaction

protected final FBLocalTransaction localTransaction

### connection

protected final FBConnection connection

### statements

protected final Collection<AbstractStatement> statements

## Constructor Details

### AbstractTransactionCoordinator

protected AbstractTransactionCoordinator(FBConnection connection, FBLocalTransaction localTransaction)

## Method Details

### getConnection

public final FBConnection getConnection() throws SQLException
Get the connection which owns this coordinator.

Specified by:
  `getConnection` in interface `FBObjectListener.StatementListener`
Returns:
  instance of `FBConnection`
Throws:
  `SQLException` - if something went wrong

### getStatements

protected final Collection<AbstractStatement> getStatements()

### setStatements

protected final void setStatements(Collection<AbstractStatement> statements)

### completeStatements

protected void completeStatements(CompletionReason reason) throws SQLException

Throws:
  `SQLException`

### ensureTransaction

public void ensureTransaction() throws SQLException

Throws:
  `SQLException`

### commit

public abstract void commit() throws SQLException

Throws:
  `SQLException`

### rollback

public abstract void rollback() throws SQLException

Throws:
  `SQLException`

### statementCompleted

public final void statementCompleted(AbstractStatement stmt) throws SQLException
Description copied from interface: `FBObjectListener.StatementListener`
Notify the listener that statement is completed. This is shortcut method for `statementCompleted(AbstractStatement, true)`.

Specified by:
  `statementCompleted` in interface `FBObjectListener.StatementListener`
Parameters:
  `stmt` - statement that was completed.
Throws:
  `SQLException`