com.softwareag.tamino.db.api.connection
Interface TDarkConnection
- All Superinterfaces:
- TConnection
- All Known Implementing Classes:
- TConnectionImpl
public interface TDarkConnection
- extends TConnection
Method Summary |
TInvocation |
getInvocation()
Return the invocation. |
boolean |
isFirstCallPending()
Indicates whether the first call for a connection is pending. |
boolean |
isHealthy()
Indicates whether the connection is still healthy. |
boolean |
isInDangerToBeStale()
Indicates whether the undelyign physical Tamino connection might have been timed out
due to the nonActivityTimeout. |
void |
resetTransactionParameters()
Resets the transactional parameters to represent the Tamino defaults. |
void |
resetTransactionTimeoutParameters()
Resets the timeout parameters to represent the Tamino defaults. |
void |
setFirstCallPending(boolean b)
Sets that the the first call for a connection is pending. |
void |
setKeepAlive(boolean keepAlive)
Set the keep alive feature of the connection.
Setting keepAlive to true will cause this connection to schedule a task
that periodically will try to refresh the databases nonActivityTimeout.
Otherwise it will stop the keep alive task. |
Methods inherited from interface com.softwareag.tamino.db.api.connection.TConnection |
close, getIsolationDegree, getLocale, getLockMode, getLockwaitMode, getMaximumTransactionDuration, getNonActivityTimeout, getSocketTimeout, getTransaction, isActive, isClosed, newAdministrationAccessor, newNonXMLObjectAccessor, newSchemaDefinition2Accessor, newSchemaDefinition3Accessor, newStreamAccessor, newSystemAccessor, newXMLObjectAccessor, prepareQuery, reset, setGroups, setIsolationDegree, setLockMode, setLockwaitMode, setMaximumTransactionDuration, setNonActivityTimeout, setSocketTimeout, useAutoCommitMode, useGlobalTransactionMode, useLocalTransactionMode, usesAutoCommitMode, usesGlobalTransactionMode, usesLocalTransactionMode |
setKeepAlive
void setKeepAlive(boolean keepAlive)
- Set the keep alive feature of the connection.
Setting keepAlive
to true
will cause this connection to schedule a task
that periodically will try to refresh the databases nonActivityTimeout.
Otherwise it will stop the keep alive task.
- Parameters:
keepAlive
- on true this connection tries to refresh the timeout; otherwise not.
resetTransactionParameters
void resetTransactionParameters()
- Resets the transactional parameters to represent the Tamino defaults.
resetTransactionTimeoutParameters
void resetTransactionTimeoutParameters()
- Resets the timeout parameters to represent the Tamino defaults.
getInvocation
TInvocation getInvocation()
- Return the invocation.
- Returns:
- the invocation
isHealthy
boolean isHealthy()
- Indicates whether the connection is still healthy. A connection can become sick (unhealthy)
if for some reason the session id/key information returned by Tamino is no longer
valid. This may happen due to some failure in the underlying protocol stacks or if
Tamino returns with an "invalid session state". In that case, the connection is
no longer usable. If JCA is involved, this situation needs to be recognized. That is
the reason that this method was introduced.
- Returns:
- boolean indicating whether the connection is healthy or not.
isInDangerToBeStale
boolean isInDangerToBeStale()
- Indicates whether the undelyign physical Tamino connection might have been timed out
due to the nonActivityTimeout. This method is used to enable an automatic reconnect for
the connection pool.
- Returns:
- boolean indicating whether the connection may have been timed out already.
isFirstCallPending
boolean isFirstCallPending()
- Indicates whether the first call for a connection is pending. This is used for pooled
connections and indicates that the connection is clean in the sense that no transaction
has been started yet. This is the time where the automatic reconnect logic needs to
check whether the connection is still alive or a reconnect needs to be attempted.
- Returns:
- boolean indicating whether the connection is healthy or not.
setFirstCallPending
void setFirstCallPending(boolean b)
- Sets that the the first call for a connection is pending.
- See Also:
com.softwareag.tamino.db.api.connection.TDarkConnection.isFirstCallPending()
Copyright (c) 2013 Software AG. All Rights Reserved.