|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.connection.BaseTransaction
com.metamatrix.common.id.dbid.spi.jdbc.DBIDResourceTransaction
public class DBIDResourceTransaction
TransactionSourceTransaction implementation.
Constructor Summary | |
---|---|
DBIDResourceTransaction(ManagedConnection connection,
boolean readonly)
Create a new instance of a transaction for a managed connection. |
Method Summary | |
---|---|
ReservedIDBlock |
createIDBlock(long blockSize,
java.lang.String context,
boolean wrapNumber)
Create and return a new ReservedIDBlock. |
Methods inherited from class com.metamatrix.common.connection.BaseTransaction |
---|
close, commit, finalize, getConnection, getRollbackOnFinalize, isClosed, isEnded, isReadonly, rollback, setRollbackOnFinalize |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.common.connection.TransactionInterface |
---|
close, commit, isClosed, isReadonly, rollback |
Constructor Detail |
---|
public DBIDResourceTransaction(ManagedConnection connection, boolean readonly) throws ManagedConnectionException
connectionPool
- the pool to which the transaction should return the connection when completedconnection
- the connection that should be used and that was created using this
factory's createConnection
method (thus the transaction subclass may cast to the
type created by the createConnection
method.readonly
- true if the transaction is to be readonly, or false otherwise
ManagedConnectionException
- if there is an error creating the transaction.Method Detail |
---|
public ReservedIDBlock createIDBlock(long blockSize, java.lang.String context, boolean wrapNumber) throws java.lang.Exception
Create and return a new ReservedIDBlock.
Read in nextID from database, createIDBlock, then update nextID in database.
createIDBlock
in interface DBIDSourceTransaction
blockSize
- size of id blockwrapNumber
- is true when the context is at its maximum limit and
the next block should start over at the beginning
TransactionServiceException
- when an error updating or reading the database occurs
java.lang.Exception
- when an error updating or reading the database occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |