|
GemFire 6.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gemstone.gemfire.cache.execute.FunctionService
public final class FunctionService
Provides the entry point into execution of user defined Functions.
Function execution provides a mean to route application behaviour to data or more
generically to peers in a DistributedSystem or servers in a Pool.
| Method Summary | |
|---|---|
static Function |
getFunction(String functionId)
Returns the Function defined by the functionId, returns null if no
function is found for the specified functionId |
static Map<String,Function> |
getRegisteredFunctions()
Returns all locally registered functions |
static boolean |
isRegistered(String functionId)
Returns true if the function is registered to FunctionService |
static Execution |
onMember(DistributedSystem system,
DistributedMember distributedMember)
Returns an Execution object that can be used to execute a data
independent function on a DistributedMember of
the DistributedSystem. |
static Execution |
onMembers(DistributedSystem system)
Returns an Execution object that can be used to execute a data
independent function on all members of the DistributedSystem. |
static Execution |
onMembers(DistributedSystem system,
Set<DistributedMember> distributedMembers)
Returns an Execution object that can be used to execute a data
independent function on the set of DistributedMembers of
the DistributedSystem. |
static Execution |
onRegion(Region region)
Returns an Execution object that can be used to execute a data
dependent function on the specified Region. |
static Execution |
onServer(Pool pool)
Returns an Execution object that can be used to execute a data
independent function on a server in the provided Pool. |
static Execution |
onServers(Pool pool)
Returns an Execution object that can be used to execute a data
independent function on all the servers in the provided Pool. |
static void |
registerFunction(Function function)
Registers the given Function with the FunctionService using
Function.getId(). |
static void |
unregisterFunction(String functionId)
Unregisters the given Function with the FunctionService using
Function.getId(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Execution onRegion(Region region)
Execution object that can be used to execute a data
dependent function on the specified Region.Pool for the region. Execution, the function is
executed on all GemFire members that define the data region, or a subset of
members. Execution.withFilter(Set)).
For DistributedRegions with DataPolicy.NORMAL, it throws UnsupportedOperationException
For DistributedRegions with DataPolicy.EMPTY, execute the function on any random member
which has DataPolicy.RELPICATE
region -
NullPointerException - if the region passed in is nullpublic static Execution onServer(Pool pool)
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.
pool - from which to chose a server for execution
NullPointerException - if Pool instance passed in is nullpublic static Execution onServers(Pool pool)
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.
pool - the set of servers to execute the function
NullPointerException - if Pool instance passed in is null
public static Execution onMember(DistributedSystem system,
DistributedMember distributedMember)
Execution object that can be used to execute a data
independent function on a DistributedMember of
the DistributedSystem. If the member is not
found in the system, the function execution will throw an Exception. If the
member goes down while dispatching or executing the function on the member,
an Exception will be thrown.
system - defines the distributed systemdistributedMember - defines a member in the distributed system
NullPointerException - if either input parameter is nullpublic static Execution onMembers(DistributedSystem system)
Execution object that can be used to execute a data
independent function on all members of the DistributedSystem.
If one of the members goes down while dispatching or executing the function on the member,
an Exception will be thrown.
system - defines the distributed system
NullPointerException - if DistributedSystem instance passed is null
public static Execution onMembers(DistributedSystem system,
Set<DistributedMember> distributedMembers)
Execution object that can be used to execute a data
independent function on the set of DistributedMembers of
the DistributedSystem. If one of the members
goes down while dispatching or executing the function, an Exception will be thrown.
system - defines the distributed systemdistributedMembers - set of distributed members on which Function to be
executed
NullPointerException - if DistributedSystem instance passed is nullpublic static Function getFunction(String functionId)
Function defined by the functionId, returns null if no
function is found for the specified functionId
functionId -
public static void registerFunction(Function function)
Function with the FunctionService using
Function.getId().
Registering a function allows execution of the function using
Execution.execute(String). Every member that could execute a
function using its Function.getId() should register the function.
NullPointerException - if function instance passed is null or Function.getId() returns
nullpublic static void unregisterFunction(String functionId)
Function with the FunctionService using
Function.getId().
NullPointerException - if function instance passed is null or Function.getId() returns
nullpublic static boolean isRegistered(String functionId)
NullPointerException - if function instance passed is null or Function.getId() returns
nullpublic static Map<String,Function> getRegisteredFunctions()
Function.getId() to Function
|
GemFire 6.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||