Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire::Execution Class Referenceabstract

gathers results from function execution More...

Inherits gemfire::SharedBase.

Public Member Functions

virtual ResultCollectorPtr execute (const char *func, bool hasResult=true, uint32_t timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT, bool isHA=true, bool optimizeForWrite=false)=0
 Executes the function using its name. More...
 
virtual ResultCollectorPtr execute (CacheableVectorPtr &routingObj, CacheablePtr &args, ResultCollectorPtr &rs, const char *func, bool hasResult, uint32_t timeout, bool isHA, bool optimizeForWrite)=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 GemFire members to execute the function. More...
 

Detailed Description

gathers results from function execution

See also
FunctionService

Member Function Documentation

virtual ResultCollectorPtr gemfire::Execution::execute ( const char *  func,
bool  hasResult = true,
uint32_t  timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT,
bool  isHA = true,
bool  optimizeForWrite = false 
)
pure virtual

Executes the function using its name.

Parameters
functhe name of the function to be executed
hasResultindicating if results are expected,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters
timeoutvalue to wait for the operation to finish before timing out.
isHAWhether the given function is HA,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters
optimizeForWriteWhether the function should be optmized for write operations,
Deprecated:
since 3.6, use of this parameter is ignored
Exceptions
Exceptionif there is an error during function execution
Returns
either a default result collector or one specified by withCollector(ResultCollector)
Deprecated:
parameters hasResult, isHA and optimizeForWrite are deprecated since NativeClient 3.6, use of these parameters is ignored.
virtual ResultCollectorPtr gemfire::Execution::execute ( CacheableVectorPtr routingObj,
CacheablePtr args,
ResultCollectorPtr rs,
const char *  func,
bool  hasResult,
uint32_t  timeout,
bool  isHA,
bool  optimizeForWrite 
)
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
hasResultindicating if results are expected,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters
timeoutvalue to wait for the operation to finish before timing out.
isHAWhether the given function is HA,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters
optimizeForWriteWhether the function should be optmized for write operations,
Deprecated:
since 3.6, use of this parameter is ignored
Exceptions
Exceptionif there is an error during function execution
Returns
either a default result collector or one specified by withCollector(ResultCollector)
void gemfire::SharedBase::preserveSB ( ) const
inherited

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount ( )
inlineinherited
Returns
the reference count
void gemfire::SharedBase::releaseSB ( ) const
inherited

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

virtual ExecutionPtr gemfire::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 gemfire::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 gemfire::Execution::withFilter ( CacheableVectorPtr  routingObj)
pure virtual

Specifies a data filter of routing objects for selecting the GemFire 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).

GemFire C++ Cache API Documentation