ScaleOut Native C++ API Library  5.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
sosscli::InvokeOptions Class Reference

The InvokeOptions class contains options that control the blocking and retry behavior of the NamedCache::lock method. More...

#include <invoke_options.h>

Public Member Functions

 InvokeOptions ()
 Default constructor. Creates a InvokeOptions class that performs up 20000 lock retries, 5 milliseconds apart.
 
 InvokeOptions (bool throw_on_error, int32_t invoke_timeout_s)
 Constructor. More...
 
virtual ~InvokeOptions ()
 Destructor.
 
bool throw_on_error ()
 Returns a boolean indicating whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error. More...
 
InvokeOptions & set_throw_on_error (bool throw_on_error)
 Sets whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error. More...
 
int32_t invoke_timeout_s ()
 Gets the amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object.
 
InvokeOptions & set_invoke_timeout_s (int32_t invoke_timeout_s)
 Sets the amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object. More...
 

Detailed Description

The InvokeOptions class contains options that control the blocking and retry behavior of the NamedCache::lock method.

Constructor & Destructor Documentation

sosscli::InvokeOptions::InvokeOptions ( bool  throw_on_error,
int32_t  invoke_timeout_s 
)
inline

Constructor.

Parameters
throw_on_errorDetermines whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error, or if the registered eval or merge functions return an error. If false, error code information will be available in the returned InvokeResult.
invoke_timeout_sAmount of time (in seconds) before invocation times out, or SOSSLIB_INFINITE_TIMEOUT.

Member Function Documentation

InvokeOptions& sosscli::InvokeOptions::set_invoke_timeout_s ( int32_t  invoke_timeout_s)
inline

Sets the amount of time (in milliseconds) between polling attempts to acquire an exclusive lock on a cached object.

Parameters
invoke_timeout_sAmount of time (in seconds) before invocation times out, or SOSSLIB_INFINITE_TIMEOUT.
Returns
*this by reference to allow for chained setter method calls.
InvokeOptions& sosscli::InvokeOptions::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 InvokeResult.

Parameters
throw_on_errorDetermines whether a method will throw an exception derived from sosscli::exceptions::StateServerException if the ScaleOut StateServer service returns an error, or if the registered eval or merge functions return an error. If false, error code information will be available in the returned InvokeResult.
Returns
*this by reference to allow for chained setter method calls.
bool sosscli::InvokeOptions::throw_on_error ( )
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 InvokeResult.


The documentation for this class was generated from the following file: