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 function
<T> T
execute(GemfireFunctionCallback<T> callback)
          Execute a function using a native GemFire Execution instance
<T> Iterable<T>
execute(String functionId, Object... args)
          Execute a function registered with an 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 function with an expected singleton result
<T> T
executeAndExtract(String functionId, Object... args)
          Execute a function registered with an ID and with an expected singleton result
 void executeWithNoResult(String functionId, Object... args)
          Execute a function registered with an ID with 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 function

Specified by:
execute in interface GemfireFunctionOperations
Parameters:
function - the function
args - calling arguments
Returns:
the contents of the results collector

executeAndExtract

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

Specified by:
executeAndExtract in interface GemfireFunctionOperations
Parameters:
function - the function
args - calling arguments
Returns:
the first item in the results collector

execute

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

Specified by:
execute in interface GemfireFunctionOperations
Parameters:
functionId - the function ID
args - the calling arguments
Returns:
the results

executeWithNoResult

public void executeWithNoResult(String functionId,
                                Object... args)
Description copied from interface: GemfireFunctionOperations
Execute a function registered with an ID with no return value

Specified by:
executeWithNoResult in interface GemfireFunctionOperations
Parameters:
functionId - the function ID
args - the calling arguments

executeAndExtract

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

Specified by:
executeAndExtract in interface GemfireFunctionOperations
Parameters:
functionId - the function ID
args - the calling arguments
Returns:
the first item in the results collector

execute

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

Specified by:
execute in interface GemfireFunctionOperations
Parameters:
callback - a callback providing the execution instance
Returns:
the execution result

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()