Sets the timeout.
Namespace: Hazelcast.TransactionAssembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.6.3.0
public TransactionOptions SetTimeout(
long timeout,
TimeUnit timeUnit
)
Public Function SetTimeout (
timeout As Long,
timeUnit As TimeUnit
) As TransactionOptions
public:
TransactionOptions^ SetTimeout(
long long timeout,
TimeUnit timeUnit
)
member SetTimeout :
timeout : int64 *
timeUnit : TimeUnit -> TransactionOptions
Parameters
- timeout
- Type: SystemInt64
the timeout. - timeUnit
- Type: Hazelcast.CoreTimeUnit
the TimeUnit of the timeout.
Return Value
Type:
TransactionOptionsthe updated TransactionOptions
Exception | Condition |
---|
ArgumentException | if timeout smaller or equal than 0, or timeUnit is null. |
Sets the timeout.
The timeout determines the maximum lifespan of a transaction. So if a transaction is configured with a
timeout of 2 minutes, then it will automatically rollback if it hasn't committed yet.
Reference