class QueryMessage extends BaseQueryMessage
RequestMessage.EncodingMetadata, RequestMessage.OpCode
Modifier and Type | Field and Description |
---|---|
private BsonDocument |
fields |
private BsonDocument |
queryDocument |
REQUEST_ID
Constructor and Description |
---|
QueryMessage(java.lang.String collectionName,
int skip,
int numberToReturn,
BsonDocument queryDocument,
BsonDocument fields,
MessageSettings settings)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
protected RequestMessage |
encodeMessageBody(BsonOutput bsonOutput,
int messageStartPosition)
Encode the message body to the given output.
|
protected RequestMessage.EncodingMetadata |
encodeMessageBodyWithMetadata(BsonOutput bsonOutput,
int messageStartPosition)
Encode the message body to the given output.
|
awaitData, isAwaitData, isNoCursorTimeout, isOplogReplay, isPartial, isSlaveOk, isTailableCursor, noCursorTimeout, oplogReplay, partial, slaveOk, tailableCursor, writeQueryPrologue
addCollectibleDocument, addDocument, backpatchMessageLength, encode, encodeWithMetadata, getCodec, getCollectionName, getCurrentGlobalId, getId, getNamespace, getOpCode, getSettings, writeMessagePrologue
private final BsonDocument queryDocument
private final BsonDocument fields
public QueryMessage(java.lang.String collectionName, int skip, int numberToReturn, BsonDocument queryDocument, BsonDocument fields, MessageSettings settings)
collectionName
- the collection nameskip
- the number of documents to skipnumberToReturn
- the number to returnqueryDocument
- the query documentfields
- the fields to return in the result documentssettings
- the message settingsprotected RequestMessage encodeMessageBody(BsonOutput bsonOutput, int messageStartPosition)
RequestMessage
encodeMessageBody
in class RequestMessage
bsonOutput
- the outputmessageStartPosition
- the start position of the messageprotected RequestMessage.EncodingMetadata encodeMessageBodyWithMetadata(BsonOutput bsonOutput, int messageStartPosition)
RequestMessage
encodeMessageBodyWithMetadata
in class RequestMessage
bsonOutput
- the outputmessageStartPosition
- the start position of the message