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

java.lang.Object
  extended by org.springframework.data.gemfire.function.execution.GemfireOnRegionFunctionTemplate
All Implemented Interfaces:
GemfireFunctionOperations, GemfireOnRegionOperations

public class GemfireOnRegionFunctionTemplate
extends Object
implements GemfireOnRegionOperations


Field Summary
protected  org.apache.commons.logging.Log log
           
protected  com.gemstone.gemfire.cache.execute.ResultCollector<?,?> resultCollector
           
protected  long timeout
           
 
Constructor Summary
GemfireOnRegionFunctionTemplate(com.gemstone.gemfire.cache.Region<?,?> region)
           
 
Method Summary
protected
<T> Iterable<T>
execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution execution)
           
<T> Iterable<T>
execute(com.gemstone.gemfire.cache.execute.Function function, Object... args)
          Execute an unregistered function
<T> Iterable<T>
execute(com.gemstone.gemfire.cache.execute.Function function, Set<?> keys, Object... args)
           
<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
<T> Iterable<T>
execute(String functionId, Set<?> keys, Object... args)
           
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
<T> T
executeAndextract(String functionId, Set<?> keys, Object... args)
           
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
 
Methods inherited from interface org.springframework.data.gemfire.function.execution.GemfireFunctionOperations
execute, execute, execute, executeAndExtract, executeAndExtract
 

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

GemfireOnRegionFunctionTemplate

public GemfireOnRegionFunctionTemplate(com.gemstone.gemfire.cache.Region<?,?> region)
Parameters:
region -
Method Detail

execute

public <T> Iterable<T> execute(com.gemstone.gemfire.cache.execute.Function function,
                               Set<?> keys,
                               Object... args)
Specified by:
execute in interface GemfireOnRegionOperations

execute

public <T> Iterable<T> execute(String functionId,
                               Set<?> keys,
                               Object... args)
Specified by:
execute in interface GemfireOnRegionOperations

executeAndextract

public <T> T executeAndextract(String functionId,
                               Set<?> keys,
                               Object... args)
Specified by:
executeAndextract in interface GemfireOnRegionOperations

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

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)

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