|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.connection.TTransactionModeCoordinator
public class TTransactionModeCoordinator
TTransactionModeCoordinator is responsible for the coordination of the concrete transaction modes that can take place during the lifetime of a database session with Tamino. As this, the coordinator defines the rules for the transition between the transaction mode. It also defines the operation that can be invoked by a client to initiate a transaction mode transition. Where the coordinator defines the rules and the initiations for mode transitions, each concrete mode defines how to update its mode for a Tamino response and how to write its mode to a command statement instance.
Constructor Summary | |
---|---|
TTransactionModeCoordinator(TGenericAccessor genericAccessor,
java.util.Locale locale)
Initializes the coordinator with the given TGenericAccessor instance. |
Method Summary | |
---|---|
TIsolationDegree |
getIsolationDegree()
Gets the isolation degree. |
java.util.Locale |
getLocale()
Gets the locale. |
TLockMode |
getLockMode()
Gets the lock mode. |
TLockwaitMode |
getLockwaitMode()
Gets the current lockwait mode A 'null' value represents the Tamino default. |
long |
getMaximumTransactionDuration()
Gets the maximum transaction duration in seconds. |
long |
getNonActivityTimeout()
Gets the nonActivity timeout. |
TTransaction |
getTransaction()
Gets the current active transaction instance. |
boolean |
isHealthy()
Indicates whether the transaction mode coordinator is healthy or not. |
boolean |
needsSessionState(TCommand command)
Test whether the given command statement needs session state updating, i.e. |
void |
resetSessionState()
Resets the session state. |
void |
resetTransactionParameters()
Resets the transaction parameters. |
void |
resetTransactionTimeoutParameters()
Resets the timeout parameters. |
void |
setGroups(java.lang.String groups)
Sets the groups for the current user. |
void |
setIsolationDegree(TIsolationDegree isolationDegree)
Sets the isolation degree. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setLockMode(TLockMode lockMode)
Sets the lock mode. |
void |
setLockwaitMode(TLockwaitMode lockwaitMode)
Sets the lockwait mode for a transaction. |
void |
setMaximumTransactionDuration(long maximumTransactionDuration)
Sets the maximum transaction duration in seconds. |
void |
setNonActivityTimeout(long nonActivityTimeout)
Sets the nonActivity timeout. |
boolean |
supports(TCommand command)
Indicates if the given command is supported within the current transaction mode of this transaction mode coordinator. |
java.lang.String |
toString()
Writes the current TransactionModeCoordinator state into a String. |
void |
updateModeFrom(TInputStream inputStream)
Updates the transaction state according to the transaction specific content of the input stream. |
void |
useAutoCommitMode()
Tells the coordinator to use an autocommit transaction mode. |
TGlobalTransaction |
useGlobalTransactionMode(TGlobalTransactionSpecifier globalTransactionSpecifier)
Tells the coordinator to use a global transacion mode. |
TLocalTransaction |
useLocalTransactionMode()
Tells the coordinator to use a local transaction mode. |
boolean |
usesAutoCommitMode()
Indicates if currently an autocommit transaction mode is used and coordinated. |
boolean |
usesGlobalTransactionMode()
Indicates if currently a global transaction mode is used and coordinated. |
boolean |
usesLocalTransactionMode()
Indicates if currently a local transaction mode is used and coordinated. |
void |
writeModeTo(TCommandStatement commandStatement)
Writes the current transaction mode to the given commandStatement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TTransactionModeCoordinator(TGenericAccessor genericAccessor, java.util.Locale locale)
Method Detail |
---|
public void useAutoCommitMode() throws TTransactionModeChangeException
TTransactionModeChangeException
- for the case of mode change problems.public boolean usesAutoCommitMode()
public TLocalTransaction useLocalTransactionMode() throws TTransactionModeChangeException
TTransactionModeChangeException
- for the case of state change problems.public boolean usesLocalTransactionMode()
public TGlobalTransaction useGlobalTransactionMode(TGlobalTransactionSpecifier globalTransactionSpecifier) throws TTransactionModeChangeException
globalTransactionSpecifier
- specifies the properties of the global transaction.
TTransactionModeChangeException
- for the case of state change problems.public boolean usesGlobalTransactionMode()
public TTransaction getTransaction()
public void resetTransactionParameters()
public void resetTransactionTimeoutParameters()
public void resetSessionState()
public void setLockwaitMode(TLockwaitMode lockwaitMode)
lockwaitMode
- the lockwait mode to be set, 'null' for Tamino default.public TLockwaitMode getLockwaitMode()
public void setIsolationDegree(TIsolationDegree isolationDegree)
isolationDegree
- the isolation degree to be set, 'null' for Tamino default.public TIsolationDegree getIsolationDegree()
public void setLockMode(TLockMode lockMode)
lockMode
- the lock mode to be set, 'null' for Tamino default.public TLockMode getLockMode()
public void setNonActivityTimeout(long nonActivityTimeout)
nonActivityTimeout
- the transaction nonActivity timeout be set,
TConnection.DEFAULT_TIMEOUT for Tamino default.public long getNonActivityTimeout()
public void setMaximumTransactionDuration(long maximumTransactionDuration)
maximumTransactionDuration
- the maximum transaction duration in seconds in seconds be set, TConnection.DEFAULT_TIMEOUT for Tamino default.public long getMaximumTransactionDuration()
public void setGroups(java.lang.String groups)
groups
- the groups for the current userpublic void writeModeTo(TCommandStatement commandStatement)
commandStatement
- gets the current transaction state.public void updateModeFrom(TInputStream inputStream) throws TTransactionModeUpdateException
inputStream
- represents a Tamino response stream containing a Tamino response XML document.
TTransactionModeUpdateException
- if transactions mode cannot be updated.public boolean supports(TCommand command)
command
- is checked wheter it can be use with the current transaction mode.
public boolean needsSessionState(TCommand command)
command
- test for this command.
public boolean isHealthy()
public void setLocale(java.util.Locale locale)
public java.util.Locale getLocale()
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 |