com.googlecode.icegem.query.bucketoriented
Class BucketOrientedQueryFunction
java.lang.Object
com.gemstone.gemfire.cache.execute.FunctionAdapter
com.googlecode.icegem.query.bucketoriented.BucketOrientedQueryFunction
- All Implemented Interfaces:
- com.gemstone.gemfire.cache.execute.Function, Serializable
public class BucketOrientedQueryFunction
- extends com.gemstone.gemfire.cache.execute.FunctionAdapter
Function for executing query on a specified set of buckets.
Do not call this function directly. Use bucket oriented query service instead.
- Author:
- Andrey Stepanov aka standy
- See Also:
BucketOrientedQueryService,
Serialized Form
|
Method Summary |
void |
execute(com.gemstone.gemfire.cache.execute.FunctionContext functionContext)
Executes query using arguments query string and query parameters. |
String |
getId()
Gets function id. |
boolean |
optimizeForWrite()
If you use redundancy for partitioned region then GemFire will send this
function to those members that contain primary or redundant copy of bucket(s). |
| Methods inherited from class com.gemstone.gemfire.cache.execute.FunctionAdapter |
hasResult, isHA |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BucketOrientedQueryFunction
public BucketOrientedQueryFunction()
execute
public void execute(com.gemstone.gemfire.cache.execute.FunctionContext functionContext)
- Executes query using arguments query string and query parameters.
- Specified by:
execute in interface com.gemstone.gemfire.cache.execute.Function- Specified by:
execute in class com.gemstone.gemfire.cache.execute.FunctionAdapter
- Parameters:
functionContext - Function context.
getId
public String getId()
- Gets function id.
- Specified by:
getId in interface com.gemstone.gemfire.cache.execute.Function- Specified by:
getId in class com.gemstone.gemfire.cache.execute.FunctionAdapter
- Returns:
- Function id.
optimizeForWrite
public boolean optimizeForWrite()
- If you use redundancy for partitioned region then GemFire will send this
function to those members that contain primary or redundant copy of bucket(s).
It can increase number of members that will execute this function.
But if you want to send this function only to those members that store primary
copy of bucket, you must enable a function option "optimizeForWrite".
See a forum link
http://forums.gemstone.com/viewtopic.php?f=3&t=496&hilit=bucket+Id&sid=f3b823b748bb253e5019e489c8480fbd
for details.
- Specified by:
optimizeForWrite in interface com.gemstone.gemfire.cache.execute.Function- Overrides:
optimizeForWrite in class com.gemstone.gemfire.cache.execute.FunctionAdapter
- Returns:
- boolean
Copyright © 2011. All Rights Reserved.