Class JsonArrayDocument

    • Method Detail

      • create

        public static JsonArrayDocument create​(String id,
                                               JsonArray content,
                                               long cas)
        Creates a JsonDocument which the document id, JSON content and the CAS value.
        Parameters:
        id - the per-bucket unique document id.
        content - the content of the document.
        cas - the CAS (compare and swap) value for optimistic concurrency.
        Returns:
        a JsonDocument.
      • create

        public static JsonArrayDocument create​(String id,
                                               int expiry,
                                               JsonArray content)
        Creates a JsonDocument which the document id, JSON content and the expiration time.
        Parameters:
        id - the per-bucket unique document id.
        content - the content of the document.
        expiry - the expiration time of the document.
        Returns:
        a JsonArrayDocument.
      • create

        public static JsonArrayDocument create​(String id,
                                               int expiry,
                                               JsonArray content,
                                               long cas)
        Creates a JsonDocument which the document id, JSON content, CAS value, expiration time and status code. This factory method is normally only called within the client library when a response is analyzed and a document is returned which is enriched with the status code. It does not make sense to pre populate the status field from the user level code.
        Parameters:
        id - the per-bucket unique document id.
        content - the content of the document.
        cas - the CAS (compare and swap) value for optimistic concurrency.
        expiry - the expiration time of the document.
        Returns:
        a JsonArrayDocument.
      • create

        public static JsonArrayDocument create​(String id,
                                               int expiry,
                                               JsonArray content,
                                               long cas,
                                               MutationToken mutationToken)
        Creates a JsonDocument which the document id, JSON content, CAS value, expiration time and status code. This factory method is normally only called within the client library when a response is analyzed and a document is returned which is enriched with the status code. It does not make sense to pre populate the status field from the user level code.
        Parameters:
        id - the per-bucket unique document id.
        content - the content of the document.
        cas - the CAS (compare and swap) value for optimistic concurrency.
        expiry - the expiration time of the document.
        mutationToken - the optional mutation token.
        Returns:
        a JsonArrayDocument.