gemfire::Execution Class Reference

Inherits gemfire::SharedBase.


Detailed Description

gathers results from function execution

See also:
FunctionService

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.
void preserveSB () const
 Atomically increment reference count.
int32_t refCount ()
 
Returns:
the reference count

void releaseSB () const
 Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
virtual ExecutionPtr withArgs (CacheablePtr args)=0
 Specifies the user data passed to the function when it is executed.
virtual ExecutionPtr withCollector (ResultCollectorPtr rs)=0
 Specifies the ResultCollector that will receive the results after the function has been executed.
virtual ExecutionPtr withFilter (CacheableVectorPtr routingObj)=0
 Specifies a data filter of routing objects for selecting the GemFire members to execute the function.

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:
func the name of the function to be executed
hasResult indicating if results are expected,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters:
timeout value to wait for the operation to finish before timing out.
isHA Whether the given function is HA,
Deprecated:
since 3.6, use of this parameter is ignored
Parameters:
optimizeForWrite Whether the function should be optmized for write operations,
Deprecated:
since 3.6, use of this parameter is ignored
Exceptions:
Exception if 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.

void gemfire::SharedBase::preserveSB (  )  const [inherited]

Atomically increment reference count.

int32_t gemfire::SharedBase::refCount (  )  [inline, inherited]

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:
args user data passed to the function execution
Returns:
an Execution with args
Exceptions:
IllegalArgumentException if 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:
IllegalArgumentException if 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:
routingObj Set defining the data filter to be used for executing the function
Returns:
an Execution with the filter
Exceptions:
IllegalArgumentException if filter passed is NULLPTR.
UnsupportedOperationException if not called after FunctionService::onRegion(Region).


GemFire C++ Cache API Documentation