org.springframework.data.gemfire.function.execution
Class GemfireOnMemberFunctionTemplate

java.lang.Object
  

extended by org.springframework.data.gemfire.function.execution.GemfireOnMemberFunctionTemplate
All Implemented Interfaces:
GemfireFunctionOperations

public class GemfireOnMemberFunctionTemplate
extends Object


Field Summary
protected  org.apache.commons.logging.Log log
           
protected  com.gemstone.gemfire.cache.execute.ResultCollector<?,?> resultCollector
           
protected  long timeout
           
 
Constructor Summary
GemfireOnMemberFunctionTemplate()
           
GemfireOnMemberFunctionTemplate(com.gemstone.gemfire.distributed.DistributedMember distributedMember)
           
GemfireOnMemberFunctionTemplate(String[] groups)
           
 
Method Summary
protected
<T> Iterable<T>
execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution)
           
protected
<T> Iterable<T>
execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution, boolean returnResult)
           
<T> Iterable<T>
execute(com.gemstone.gemfire.cache.execute.Function function, Object... args)
          Execute an unregistered GemFire Function with the given arguments.
<T> T
execute(GemfireFunctionCallback<T> callback)
          Execute a GemFire Function using a native GemFire Execution instance.
<T> Iterable<T>
execute(String functionId, Object... args)
          Execute a GemFire Function registered with the given ID.
protected
<T> T
executeAndExtract(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution)
           
<T> T
executeAndExtract(com.gemstone.gemfire.cache.execute.Function function, Object... args)
          Execute an unregistered GemFire Function with the expected singleton result.
<T> T
executeAndExtract(String functionId, Object... args)
          Execute a GemFire Function registered with an ID and with an expected singleton result
 void executeWithNoResult(String functionId, Object... args)
          Execute a GemFire Function registered with the given ID having no return value.
protected  org.springframework.data.gemfire.function.execution.AbstractFunctionExecution getFunctionExecution()
           
 com.gemstone.gemfire.cache.execute.ResultCollector<?,?> getResultCollector()
           
 void setResultCollector(com.gemstone.gemfire.cache.execute.ResultCollector<?,?> resultCollector)
           
 void setTimeout(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

timeout

protected long timeout

resultCollector

protected volatile com.gemstone.gemfire.cache.execute.ResultCollector<?,?> resultCollector
Constructor Detail

GemfireOnMemberFunctionTemplate

public GemfireOnMemberFunctionTemplate(com.gemstone.gemfire.distributed.DistributedMember distributedMember)

GemfireOnMemberFunctionTemplate

public GemfireOnMemberFunctionTemplate(String[] groups)

GemfireOnMemberFunctionTemplate

public GemfireOnMemberFunctionTemplate()
Method Detail

getFunctionExecution

protected org.springframework.data.gemfire.function.execution.AbstractFunctionExecution getFunctionExecution()

execute

public <T> Iterable<T> execute(com.gemstone.gemfire.cache.execute.Function function,
                               Object... args)
Description copied from interface: GemfireFunctionOperations
Execute an unregistered GemFire Function with the given arguments.

Specified by:
execute in interface GemfireFunctionOperations
Type Parameters:
T - type parameter specifying the result type of the Function execution.
Parameters:
function - the GemFire Function object to execute.
args - an array of Object arguments to the Function call.
Returns:
the contents of the ResultsCollector.

executeAndExtract

public <T> T executeAndExtract(com.gemstone.gemfire.cache.execute.Function function,
                               Object... args)
Description copied from interface: GemfireFunctionOperations
Execute an unregistered GemFire Function with the expected singleton result.

Specified by:
executeAndExtract in interface GemfireFunctionOperations
Type Parameters:
T - type parameter specifying the result type of the Function execution.
Parameters:
function - the GemFire Function object.
args - an array of Object arguments to the Function call.
Returns:
the first item in the ResultsCollector.
See Also:
Function

execute

public <T> Iterable<T> execute(String functionId,
                               Object... args)
Description copied from interface: GemfireFunctionOperations
Execute a GemFire Function registered with the given ID.

Specified by:
execute in interface GemfireFunctionOperations
Type Parameters:
T - type parameter specifying the result type of the Function execution.
Parameters:
functionId - the ID under which the GemFire function is registered.
args - an array of Object arguments to the Function call.
Returns:
the results

executeWithNoResult

public void executeWithNoResult(String functionId,
                                Object... args)
Description copied from interface: GemfireFunctionOperations
Execute a GemFire Function registered with the given ID having no return value.

Specified by:
executeWithNoResult in interface GemfireFunctionOperations
Parameters:
functionId - the ID under which the GemFire function is registered.
args - an array of Object arguments to the Function call.

executeAndExtract

public <T> T executeAndExtract(String functionId,
                               Object... args)
Description copied from interface: GemfireFunctionOperations
Execute a GemFire Function registered with an ID and with an expected singleton result

Specified by:
executeAndExtract in interface GemfireFunctionOperations
Type Parameters:
T - type parameter specifying the result type of the Function execution.
Parameters:
functionId - the ID under which the GemFire function is registered.
args - an array of Object arguments to the Function call.
Returns:
the first item in the results collector

execute

public <T> T execute(GemfireFunctionCallback<T> callback)
Description copied from interface: GemfireFunctionOperations
Execute a GemFire Function using a native GemFire Execution instance.

Specified by:
execute in interface GemfireFunctionOperations
Type Parameters:
T - type parameter specifying the result type of the Function execution.
Parameters:
callback - a callback providing the execution instance.
Returns:
the Function execution result.
See Also:
GemfireFunctionCallback

execute

protected <T> Iterable<T> execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution)

execute

protected <T> Iterable<T> execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution,
                                  boolean returnResult)

executeAndExtract

protected <T> T executeAndExtract(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution)

setTimeout

public void setTimeout(long timeout)

setResultCollector

public void setResultCollector(com.gemstone.gemfire.cache.execute.ResultCollector<?,?> resultCollector)

getResultCollector

public com.gemstone.gemfire.cache.execute.ResultCollector<?,?> getResultCollector()