Class ReplyHeader


  • @Deprecated(since="2021-05-27")
    public final class ReplyHeader
    extends java.lang.Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Contains the details of a reply from a MongoDB server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int REPLY_HEADER_LENGTH
      Deprecated.
      The length of the OP_REPLY header in the MongoDB wire protocol.
      static int TOTAL_REPLY_HEADER_LENGTH
      Deprecated.
      The length of the OP_REPLY header plus the length of the standard message header
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      long getCursorId()
      Deprecated.
      Gets the cursor ID that this response is a part of.
      int getMessageLength()
      Deprecated.
      Gets the total size of the message in bytes.
      int getNumberReturned()
      Deprecated.
      Gets the number of documents to expect in the body of this reply.
      int getRequestId()
      Deprecated.
      This is a client or database-generated identifier that uniquely identifies this message.
      int getResponseFlags()
      Deprecated.
      Gets additional information about the response.
      int getResponseTo()
      Deprecated.
      Along with the requestID field in queries, clients can use this to associate query responses with the originating query.
      int getStartingFrom()
      Deprecated.
      Returns the position in the cursor that is the start point of this reply.
      boolean isCursorNotFound()
      Deprecated.
      Gets whether this query was performed with a cursor ID that was not valid on the server.
      boolean isQueryFailure()
      Deprecated.
      Gets whether the query failed or not.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • REPLY_HEADER_LENGTH

        public static final int REPLY_HEADER_LENGTH
        Deprecated.
        The length of the OP_REPLY header in the MongoDB wire protocol.
        See Also:
        Constant Field Values
      • TOTAL_REPLY_HEADER_LENGTH

        public static final int TOTAL_REPLY_HEADER_LENGTH
        Deprecated.
        The length of the OP_REPLY header plus the length of the standard message header
        See Also:
        Constant Field Values
    • Method Detail

      • getMessageLength

        public int getMessageLength()
        Deprecated.
        Gets the total size of the message in bytes. This total includes the 4 bytes that holds the message length.
        Returns:
        the total message size, including all of the header
      • getRequestId

        public int getRequestId()
        Deprecated.
        This is a client or database-generated identifier that uniquely identifies this message. Along with the responseTo field in responses, clients can use this to associate query responses with the originating query.
        Returns:
        the identifier for this message
      • getResponseTo

        public int getResponseTo()
        Deprecated.
        Along with the requestID field in queries, clients can use this to associate query responses with the originating query.
        Returns:
        the request ID from the original request
      • getResponseFlags

        public int getResponseFlags()
        Deprecated.
        Gets additional information about the response.
        • 0 - CursorNotFound: Set when getMore is called but the cursor id is not valid at the server. Returned with zero results.
        • 1 - QueryFailure: Set when query failed. Results consist of one document containing an "$err" field describing the failure.
        • 2 - ShardConfigStale: Drivers should ignore this. Only mongos will ever see this set, in which case, it needs to update config from the server.
        • 3 - AwaitCapable: Set when the server supports the AwaitData Query option. If it doesn't, a client should sleep a little between getMore's of a Tailable cursor. Mongod version 1.6 supports AwaitData and thus always sets AwaitCapable.
        • 4-31 - Reserved: Ignore
        Returns:
        bit vector - see details above
      • getCursorId

        public long getCursorId()
        Deprecated.
        Gets the cursor ID that this response is a part of. If there are no more documents to fetch from the server, the cursor ID will be 0. This cursor ID must be used in any messages used to get more data, and also must be closed by the client when no longer needed.
        Returns:
        cursor ID to use if the client needs to fetch more from the server
      • getStartingFrom

        public int getStartingFrom()
        Deprecated.
        Returns the position in the cursor that is the start point of this reply.
        Returns:
        where in the cursor this reply is starting
      • getNumberReturned

        public int getNumberReturned()
        Deprecated.
        Gets the number of documents to expect in the body of this reply.
        Returns:
        number of documents in the reply
      • isCursorNotFound

        public boolean isCursorNotFound()
        Deprecated.
        Gets whether this query was performed with a cursor ID that was not valid on the server.
        Returns:
        true if this reply indicates the request to get more data was performed with a cursor ID that's not valid on the server
      • isQueryFailure

        public boolean isQueryFailure()
        Deprecated.
        Gets whether the query failed or not.
        Returns:
        true if this reply indicates the query failed.