Class AbstractSubdocRequest

    • Constructor Detail

      • AbstractSubdocRequest

        public AbstractSubdocRequest​(String key,
                                     String path,
                                     String bucket,
                                     ByteBuf... restOfContent)
        Creates a new AbstractSubdocRequest.
        Parameters:
        key - the key of the document.
        path - the subdocument path to consider inside the document.
        bucket - the bucket of the document.
        restOfContent - the optional remainder of the content() of the final protocol message, or null if not applicable
        Throws:
        NullPointerException - if the path is null (see EXCEPTION_NULL_PATH)
    • Method Detail

      • cleanUpAndThrow

        protected void cleanUpAndThrow​(RuntimeException e)
        Utility method to ensure good cleanup when throwing an exception from a constructor. Cleans the content composite buffer by releasing it before throwing the exception.
      • path

        public String path()
        Description copied from interface: BinarySubdocRequest
        Returns the **path** inside a JSON document where values will be obtained/mutated. Some sub-document operations authorize the use of an empty path while other don't.
        Specified by:
        path in interface BinarySubdocRequest
        Returns:
        the path to work from inside the JSON document.