final class ReplyHeader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
CURSOR_NOT_FOUND_RESPONSE_FLAG |
private long |
cursorId |
private int |
messageLength |
private int |
numberReturned |
private int |
opMsgFlagBits |
private static int |
QUERY_FAILURE_RESPONSE_FLAG |
static int |
REPLY_HEADER_LENGTH
The length of the OP_REPLY header in the MongoDB wire protocol.
|
private int |
requestId |
private int |
responseFlags |
private int |
responseTo |
private int |
startingFrom |
static int |
TOTAL_REPLY_HEADER_LENGTH
The length of the OP_REPLY header plus the length of the standard message header
|
Modifier | Constructor and Description |
---|---|
(package private) |
ReplyHeader(ByteBuf header,
CompressedHeader compressedHeader) |
(package private) |
ReplyHeader(ByteBuf header,
MessageHeader messageHeader) |
private |
ReplyHeader(int messageLength,
int opCode,
MessageHeader messageHeader,
ByteBuf header) |
Modifier and Type | Method and Description |
---|---|
long |
getCursorId()
Gets the cursor ID that this response is a part of.
|
int |
getMessageLength()
Gets the total size of the message in bytes.
|
int |
getNumberReturned()
Gets the number of documents to expect in the body of this reply.
|
(package private) int |
getOpMsgFlagBits() |
int |
getRequestId()
This is a client or database-generated identifier that uniquely identifies this message.
|
int |
getResponseFlags()
Gets additional information about the response.
|
int |
getResponseTo()
Along with the requestID field in queries, clients can use this to associate query responses with the originating query.
|
int |
getStartingFrom()
Returns the position in the cursor that is the start point of this reply.
|
boolean |
isCursorNotFound()
Gets whether this query was performed with a cursor ID that was not valid on the server.
|
boolean |
isQueryFailure()
Gets whether the query failed or not.
|
public static final int REPLY_HEADER_LENGTH
public static final int TOTAL_REPLY_HEADER_LENGTH
private static final int CURSOR_NOT_FOUND_RESPONSE_FLAG
private static final int QUERY_FAILURE_RESPONSE_FLAG
private final int messageLength
private final int requestId
private final int responseTo
private final int responseFlags
private final long cursorId
private final int startingFrom
private final int numberReturned
private final int opMsgFlagBits
ReplyHeader(ByteBuf header, MessageHeader messageHeader)
ReplyHeader(ByteBuf header, CompressedHeader compressedHeader)
private ReplyHeader(int messageLength, int opCode, MessageHeader messageHeader, ByteBuf header)
public int getMessageLength()
public int getRequestId()
responseTo
field in
responses, clients can use this to associate query responses with the originating query.public int getResponseTo()
public int getResponseFlags()
public long getCursorId()
public int getStartingFrom()
public int getNumberReturned()
public boolean isCursorNotFound()
public boolean isQueryFailure()
int getOpMsgFlagBits()