The LockOptions class contains options that control the blocking and retry behavior of the NamedCache::lock method.
More...
#include <lock_options.h>
The LockOptions class contains options that control the blocking and retry behavior of the NamedCache::lock method.
sosscli::LockOptions::LockOptions |
( |
bool |
throw_on_error, |
|
|
int32_t |
max_lock_retry_count, |
|
|
int32_t |
lock_retry_interval_ms |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
throw_on_error | Determines whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error. If false, error code information will be available in the returned LockResult. |
max_lock_retry_count | Number of retries that the lock call should perform when polling to acquire an exclusive lock on an object. |
lock_retry_interval_ms | Amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object. |
LockOptions& sosscli::LockOptions::set_lock_retry_interval_ms |
( |
int32_t |
lock_retry_interval_ms) | |
|
|
inline |
Sets the amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object.
- Parameters
-
lock_retry_interval_ms | Amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object. |
- Returns
- *this by reference to allow for chained setter method calls.
LockOptions& sosscli::LockOptions::set_max_lock_retry_count |
( |
int32_t |
max_lock_retry_count) | |
|
|
inline |
Sets the number of retries that the lock call should perform when polling to acquire an exclusive lock on an object.
- Parameters
-
max_lock_retry_count | Number of retries that the lock call should perform when polling to acquire an exclusive lock on an object. |
- Returns
- *this by reference to allow for chained setter method calls.
LockOptions& sosscli::LockOptions::set_throw_on_error |
( |
bool |
throw_on_error) | |
|
|
inline |
Sets whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error.
If false, error code information will be available in the returned LockResult.
- Parameters
-
- Returns
- *this by reference to allow for chained setter method calls.
bool sosscli::LockOptions::throw_on_error |
( |
) | |
const |
|
inline |
Returns a boolean indicating whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error.
If false, error code information will be available in the returned LockResult.
LockOptions constant that indicates that a lock() operation should use the cache's default options.
The documentation for this class was generated from the following file: