public class PartitionedRangeQueryOperation extends RangeQueryOperation
setCurrentPartition
method.
For example:
PartitionedRangeQueryOperationquery; for (LocalBucket bucket : (LocalBucket[])null) { query.setCurrentObject(bucket.getBucketID()); bucket.processQuery(query); }
QueryOperation.DataEqualOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected RankedSortedCollection |
currentPartition
Current partition list
|
protected boolean |
isPartitionLocked
The locking flag for
setCurrentPartition |
protected java.util.Map<java.lang.Object,RankedSortedCollection> |
partitionedAnswer
The answer holder
|
radius
suppData, uuidOperationComparator
Constructor and Description |
---|
PartitionedRangeQueryOperation(LocalAbstractObject queryObject,
float radius)
Creates a new instance of RangeQueryOperation given the query object and radius.
|
Modifier and Type | Method and Description |
---|---|
RankedAbstractObject |
addToAnswer(LocalAbstractObject object,
float distThreshold)
Adds an object to the answer.
|
java.util.Map<java.lang.Object,RankedSortedCollection> |
getAllPartitionsAnswer()
Returns the whole answer divided by partitions.
|
java.util.Iterator<RankedAbstractObject> |
getPartitionAnswer(java.lang.Object partitionIdentifier)
Returns the partial answer for the specified partition.
|
void |
setCurrentPartition(java.lang.Object partitionObject)
Sets the current partition differentiation object.
|
void |
setCurrentPartitionLock(boolean isPartitionLocked)
Set lock for
setCurrentPartition . |
java.lang.String |
toString()
Returns a string representation of this operation.
|
protected void |
updateFrom(RankingQueryOperation operation)
Update all answer data of this operation from the another operation.
|
dataEqualsImpl, dataHashCode, evaluate, getAnswerThreshold, getArgument, getArgumentCount, getRadius
addToAnswer, clearSurplusData, clone, createOperation, getQueryObject, isStoringMetaDistances
addToAnswer, endOperation, getAnswer, getAnswer, getAnswerClass, getAnswerCollectionClass, getAnswerCollectionClone, getAnswerComparator, getAnswerCount, getAnswerDistance, getAnswerDistanceRestricted, getAnswerDistanceRestricted, getAnswerMaximalCapacity, getAnswerObjects, getLastAnswer, getSubAnswer, getSubAnswer, getSubAnswerCount, isAnswerFull, resetAnswer, setAnswerCollection, setAnswerIgnoringDuplicates, setAnswerThresholdComputation, setAnswerThresholdComputation, updateFrom
appendErrorCode, clone, dataEquals, endOperation, getAllSubAnswers, getAnswerType, getQueryAnswer, iterator, setAnswerType, wasSuccessful
appendArguments, containsParameter, createOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getArgumentString, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter
protected final java.util.Map<java.lang.Object,RankedSortedCollection> partitionedAnswer
protected RankedSortedCollection currentPartition
protected boolean isPartitionLocked
setCurrentPartition
public PartitionedRangeQueryOperation(LocalAbstractObject queryObject, float radius)
queryObject
- the query objectradius
- the query radiuspublic void setCurrentPartition(java.lang.Object partitionObject)
partitionObject
- the object to differentiate the answer partitionpublic void setCurrentPartitionLock(boolean isPartitionLocked)
setCurrentPartition
.
If set to true, all calls to setCurrentPartition
will be ignored until it is unlocked again.isPartitionLocked
- pass true for enabling the lock or false to disable itpublic RankedAbstractObject addToAnswer(LocalAbstractObject object, float distThreshold)
RankingSingleQueryOperation
query object
and the specified object.addToAnswer
in class RankingSingleQueryOperation
object
- the object to adddistThreshold
- the threshold on distance;
if the computed distance exceeds the threshold (sharply),
the object is not added to the answerpublic java.util.Iterator<RankedAbstractObject> getPartitionAnswer(java.lang.Object partitionIdentifier)
partitionIdentifier
- the identifier to select a particular partitionpublic java.util.Map<java.lang.Object,RankedSortedCollection> getAllPartitionsAnswer()
protected void updateFrom(RankingQueryOperation operation)
updateFrom
in class RankingQueryOperation
operation
- the operation to update answer frompublic java.lang.String toString()
toString
in class AbstractOperation