public class GetObjectCountOperation extends AbstractOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected int |
objectCount
The number of objects counted by this operation
|
suppData, uuidOperationComparator
Constructor and Description |
---|
GetObjectCountOperation()
Creates a new instance of GetAllObjectsQuery
|
Modifier and Type | Method and Description |
---|---|
void |
addToAnswer(int objectCount)
Add the specified count to the answer of this operation.
|
void |
endOperation()
End operation successfully.
|
int |
evaluate(BucketDispatcher dispatcher)
Evaluate this query on a given bucket dispatcher.
|
int |
evaluate(LocalBucket bucket)
Evaluate this query on a given bucket.
|
int |
getAnswerCount()
Returns the number of objects counted by this operation.
|
java.lang.Object |
getArgument(int index)
Returns argument that was passed while constructing instance.
|
int |
getArgumentCount()
Returns number of arguments that were passed while constructing this instance.
|
java.lang.String |
toString()
Prints out the object count in a fancy way.
|
boolean |
wasSuccessful()
Returns true if this operation has finished successfuly.
|
appendArguments, appendErrorCode, clearSurplusData, clone, containsParameter, createOperation, endOperation, 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, updateFrom
public GetObjectCountOperation()
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AbstractOperation
index
- index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AbstractOperation
public int evaluate(BucketDispatcher dispatcher)
dispatcher
- the bucket dispatcher to update answer frompublic int evaluate(LocalBucket bucket)
bucket
- the bucket to update answer frompublic int getAnswerCount()
public void addToAnswer(int objectCount)
objectCount
- the count to addpublic boolean wasSuccessful()
wasSuccessful
in class AbstractOperation
public void endOperation()
endOperation
in class AbstractOperation
public java.lang.String toString()
toString
in class AbstractOperation