|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.connection.TTransactionMode
com.softwareag.tamino.db.api.connection.TLocalTransactionMode
public class TLocalTransactionMode
TLocalTransactionMode is the implementation of TTransactionMode for local transaction mode. It implements the update plug in method for the transaction mode. Also it implements the behaviour of writing the transaction mode to a TCommandStatement instance. It also implements the TLocalTransaction interface which the client uses for commiting and rolling back a transaction.
Constructor Summary | |
---|---|
TLocalTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
Initializes with the given session state. |
Method Summary | |
---|---|
void |
begin()
Begin this transaction mode. |
void |
commit()
Performs a commit on the running transaction. |
protected void |
doUpdate(TStreamHeader header)
Updates the transaction state according to the transaction specific content of the stream header. |
void |
end()
End this transaction mode. |
boolean |
needsSessionState(TCommand command)
Test whether the given command statement needs session state updating, i.e. |
void |
rollback()
Performs a rollback on the running transaction. |
boolean |
supports(TCommand command)
Indicates if the given command is supported within the current transaction mode. |
java.lang.String |
toString()
Writes the current transaction mode into a String. |
void |
writeTo(TCommandStatement commandStatement)
Writes the current transaction state to the given commandStatement. |
Methods inherited from class com.softwareag.tamino.db.api.connection.TTransactionMode |
---|
getGenericAccessor, getLocale, getSessionState, getTransactionModeCoordinator, getTransactionParameters, getTransactionTimeoutParameters, isReleased, release, setLocale, update, use |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.softwareag.tamino.db.api.connection.TTransaction |
---|
getLocale, setLocale |
Constructor Detail |
---|
public TLocalTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
Method Detail |
---|
public void begin() throws TAccessorException
begin
in class TTransactionMode
TAccessorException
public void end() throws TAccessorException
end
in class TTransactionMode
TAccessorException
public void commit() throws TTransactionException
commit
in interface TLocalTransaction
TTransactionException
- is thrown if the commit fails.public void rollback() throws TTransactionException
rollback
in interface TLocalTransaction
TTransactionException
- is thrown if the rollback fails.public void writeTo(TCommandStatement commandStatement)
writeTo
in class TTransactionMode
commandStatement
- gets the current transaction state.public boolean supports(TCommand command)
supports
in class TTransactionMode
command
- is checked wheter it can be use with the current transaction mode.
public boolean needsSessionState(TCommand command)
needsSessionState
in class TTransactionMode
command
- test for this command.
protected void doUpdate(TStreamHeader header) throws TSessionStateUpdateException
doUpdate
in class TTransactionMode
header
- is the TStreamHeader of a TInputStream instance.
TSessionStateUpdateException
- in case of a failure.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |