public class AggregateCommand extends Command implements CursorableMessage
COMMAND_COLLECTION
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
AggregateCommand(Aggregate aggregation,
String databaseName,
String collectionName,
Document commandDocument,
ReadPreference readPreference,
VersionRange requiredServerVersion)
Create a new AggregateCommand.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Determines if the passed object is of this same type as this object and
if so that its fields are equal.
|
int |
getBatchSize()
Returns the number of documents to be returned in each batch of results.
|
int |
getLimit()
Returns the total number of documents to be returned.
|
int |
hashCode()
Computes a reasonable hash code.
|
getCommand, getOperationName, getRoutingDocument, isAllowJumbo, setAllowJumbo, size, toString, validateSize, write, write
finishHeader, getCollectionName, getDatabaseName, getReadPreference, getRequiredVersionRange, init, writeHeader, writeHeader
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCollectionName
getDatabaseName, getOperationName, getReadPreference, getRequiredVersionRange, size, validateSize, write, write
public AggregateCommand(Aggregate aggregation, String databaseName, String collectionName, Document commandDocument, ReadPreference readPreference, VersionRange requiredServerVersion)
aggregation
- The original aggregation.databaseName
- The name of the database.collectionName
- The name of the collection to run the aggregation on.commandDocument
- The command document containing the command and options.readPreference
- The preference for which servers to use to retrieve the
results.requiredServerVersion
- The required version of the server to support processing the
message.public boolean equals(Object object)
equals
in class Command
object
- The object to compare to.Object.equals(java.lang.Object)
public int getBatchSize()
Overridden to return the batch size from the Aggregate
.
getBatchSize
in interface CursorableMessage
public int getLimit()
Overridden to return the limit from the Aggregate
.
getLimit
in interface CursorableMessage
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.