gemfire::FunctionService Class Reference

Inherits gemfire::SharedBase.


Detailed Description

entry point for function execution

See also:
Execution

Public Member Functions

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.

Static Public Member Functions

static ExecutionPtr onRegion (RegionPtr region)
 Returns a Execution object that can be used to execute a data dependent function on the specified Region.
static ExecutionPtr onServer (const RegionServicePtr &cache)
 Returns a Execution object that can be used to execute a data independent function on a server where Cache is attached.
static ExecutionPtr onServer (const PoolPtr &pool)
 Returns a Execution object that can be used to execute a data independent function on a server in the provided Pool.
static ExecutionPtr onServers (const RegionServicePtr &cache)
 Returns a Execution object that can be used to execute a data independent function on all the servers where Cache is attached.
static ExecutionPtr onServers (const PoolPtr &pool)
 Returns a Execution object that can be used to execute a data independent function on all the servers in the provided Pool.

Member Function Documentation

static ExecutionPtr gemfire::FunctionService::onRegion ( RegionPtr  region  )  [static]

Returns a Execution object that can be used to execute a data dependent function on the specified Region.


When invoked from a GemFire client, the method returns an Execution instance that sends a message to one of the connected servers as specified by the Pool for the region. Depending on the filters setup on the Execution, the function is executed on all GemFire members that define the data region, or a subset of members. Execution::withFilter(filter)).

Parameters:
region If Pool is multiusersecure mode then one need to pass nstance of Region from RegionService.
Returns:
Execution
Exceptions:
NullPointerException if the region passed in is NULLPTR

static ExecutionPtr gemfire::FunctionService::onServer ( const RegionServicePtr cache  )  [inline, static]

Returns a Execution object that can be used to execute a data independent function on a server where Cache is attached.

If the server goes down while dispatching or executing the function, an Exception will be thrown.

Parameters:
cache cache from which to chose a server for execution
Returns:
Execution
Exceptions:
NullPointerException if Pool instance passed in is NULLPTR
UnsupportedOperationException if Pool is in multiusersecure Mode

static ExecutionPtr gemfire::FunctionService::onServer ( const PoolPtr pool  )  [inline, static]

Returns a Execution object that can be used to execute a data independent function on a server in the provided Pool.

If the server goes down while dispatching or executing the function, an Exception will be thrown.

Parameters:
pool from which to chose a server for execution
Returns:
Execution
Exceptions:
NullPointerException if Pool instance passed in is NULLPTR
UnsupportedOperationException if Pool is in multiusersecure Mode

static ExecutionPtr gemfire::FunctionService::onServers ( const RegionServicePtr cache  )  [inline, static]

Returns a Execution object that can be used to execute a data independent function on all the servers where Cache is attached.

If one of the servers goes down while dispatching or executing the function on the server, an Exception will be thrown.

Parameters:
cache the Cache where function need to execute.
Returns:
Execution
Exceptions:
NullPointerException if Pool instance passed in is NULLPTR
UnsupportedOperationException if Pool is in multiusersecure Mode

static ExecutionPtr gemfire::FunctionService::onServers ( const PoolPtr pool  )  [inline, static]

Returns a Execution object that can be used to execute a data independent function on all the servers in the provided Pool.

If one of the servers goes down while dispatching or executing the function on the server, an Exception will be thrown.

Parameters:
pool the set of servers to execute the function
Returns:
Execution
Exceptions:
NullPointerException if Pool instance passed in is NULLPTR
UnsupportedOperationException if Pool is in multiusersecure Mode

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.


GemFire C++ Cache API Documentation