| TransactionOptionsSetTimeout Method |
Sets the timeout.
Namespace:
Hazelcast.Transaction
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.11
Syntax 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
Exceptions Exception | Condition |
---|
ArgumentException | if timeout smaller or equal than 0, or timeUnit is null. |
Remarks
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.
See Also