public class TGlobalTransactionMode extends TTransactionMode implements TGlobalTransaction
Constructor and Description |
---|
TGlobalTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
Initializes with the given session state.
|
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin this transaction mode.
|
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.
|
void |
enlist(TGlobalTransactionSpecifier globalTransactionSpecifier)
Use the given parameter for a global transaction.
|
boolean |
needsSessionState(TCommand command)
Test whether the given command statement needs session state updating, i.e.
|
void |
setGlobalTransactionSpecifier(TGlobalTransactionSpecifier globalTransactionSpecifier)
Sets the global transaction specifier.
|
boolean |
supports(TCommand command)
Indicates if the given command is supported within the current transaction mode.
|
java.lang.String |
toString()
Writes the current transaction state into a String.
|
void |
writeTo(TCommandStatement commandStatement)
Writes the current transaction state to the given commandStatement.
|
getGenericAccessor, getLocale, getSessionState, getTransactionModeCoordinator, getTransactionParameters, getTransactionTimeoutParameters, isReleased, release, setLocale, update, use
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocale, setLocale
public TGlobalTransactionMode(TTransactionModeCoordinator transactionModeCoordinator)
public void setGlobalTransactionSpecifier(TGlobalTransactionSpecifier globalTransactionSpecifier)
globalTransactionSpecifier
- the global transaction specifier.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.public void begin() throws TAccessorException
begin
in class TTransactionMode
TAccessorException
public void end() throws TAccessorException
end
in class TTransactionMode
TAccessorException
public void enlist(TGlobalTransactionSpecifier globalTransactionSpecifier) throws TTransactionException
enlist
in interface TGlobalTransaction
globalTransactionSpecifier
- the global transaction specifier. Should be originated by a transaction controller.TTransactionException
- signals an error while attempting the enlist operation.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
Copyright (c) 2017 Software AG. All Rights Reserved.