VMware GemFire Native C++ Reference  9.1
apache::geode::client::Execution Class Referenceabstract

gathers results from function execution More...

Inherits apache::geode::client::SharedBase.

Public Member Functions

virtual ResultCollectorPtr execute (const char *func, uint32_t timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0
 Executes the function using its name. More...
 
virtual ResultCollectorPtr execute (CacheableVectorPtr &routingObj, CacheablePtr &args, ResultCollectorPtr &rs, const char *func, uint32_t timeout)=0
 Executes the function using its name. More...
 
void preserveSB () const
 Atomically increment reference count. More...
 
int32_t refCount ()
 
void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More...
 
virtual ExecutionPtr withArgs (CacheablePtr args)=0
 Specifies the user data passed to the function when it is executed. More...
 
virtual ExecutionPtr withCollector (ResultCollectorPtr rs)=0
 Specifies the ResultCollector that will receive the results after the function has been executed. More...
 
virtual ExecutionPtr withFilter (CacheableVectorPtr routingObj)=0
 Specifies a data filter of routing objects for selecting the Geode members to execute the function. More...
 

Detailed Description

gathers results from function execution

See also
FunctionService

Member Function Documentation

virtual ResultCollectorPtr apache::geode::client::Execution::execute ( const char *  func,
uint32_t  timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT 
)
pure virtual

Executes the function using its name.

Parameters
functhe name of the function to be executed
timeoutvalue to wait for the operation to finish before timing out.
Exceptions
Exceptionif there is an error during function execution
Returns
either a default result collector or one specified by withCollector(ResultCollector)
virtual ResultCollectorPtr apache::geode::client::Execution::execute ( CacheableVectorPtr routingObj,
CacheablePtr args,
ResultCollectorPtr rs,
const char *  func,
uint32_t  timeout 
)
pure virtual

Executes the function using its name.

Parameters
routingObjSet defining the data filter to be used for executing the function
argsuser data passed to the function execution
rs* Specifies the ResultCollector that will receive the results after the function has been executed.
functhe name of the function to be executed
timeoutvalue to wait for the operation to finish before timing out.
Exceptions
Exceptionif there is an error during function execution
Returns
either a default result collector or one specified by withCollector(ResultCollector)
void apache::geode::client::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t apache::geode::client::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void apache::geode::client::SharedBase::releaseSB ( ) const
inherited

Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.

virtual ExecutionPtr apache::geode::client::Execution::withArgs ( CacheablePtr  args)
pure virtual

Specifies the user data passed to the function when it is executed.

Parameters
argsuser data passed to the function execution
Returns
an Execution with args
Exceptions
IllegalArgumentExceptionif the input parameter is NULLPTR
virtual ExecutionPtr apache::geode::client::Execution::withCollector ( ResultCollectorPtr  rs)
pure virtual

Specifies the ResultCollector that will receive the results after the function has been executed.

Returns
an Execution with a collector
Exceptions
IllegalArgumentExceptionif ResultCollector is NULLPTR
See also
ResultCollector
virtual ExecutionPtr apache::geode::client::Execution::withFilter ( CacheableVectorPtr  routingObj)
pure virtual

Specifies a data filter of routing objects for selecting the Geode members to execute the function.

If the filter set is empty the function is executed on all members that have the FunctionService::onRegion(Region).

Parameters
routingObjSet defining the data filter to be used for executing the function
Returns
an Execution with the filter
Exceptions
IllegalArgumentExceptionif filter passed is NULLPTR.
UnsupportedOperationExceptionif not called after FunctionService::onRegion(Region).

Pivotal GemFire C++ Cache API Documentation