Class AbstractSubdocMutationRequest

    • Constructor Detail

      • AbstractSubdocMutationRequest

        protected AbstractSubdocMutationRequest​(String key,
                                                String path,
                                                ByteBuf fragment,
                                                String bucket,
                                                int expiration,
                                                long cas)
        Parameters:
        key - the key of the document.
        path - the subdocument path to consider inside the document.
        fragment - the fragment of valid JSON to mutate into at the site denoted by the path.
        bucket - the bucket of the document.
        expiration - the TTL of the whole enclosing document.
        cas - the cas value for the operation
        Throws:
        NullPointerException - if the path is null (see AbstractSubdocRequest.EXCEPTION_NULL_PATH)
      • AbstractSubdocMutationRequest

        protected AbstractSubdocMutationRequest​(String key,
                                                String path,
                                                ByteBuf fragment,
                                                String bucket,
                                                int expiration,
                                                long cas,
                                                rx.subjects.Subject<CouchbaseResponse,​CouchbaseResponse> observable)
        Parameters:
        key - the key of the document.
        path - the subdocument path to consider inside the document.
        fragment - the fragment of valid JSON to mutate into at the site denoted by the path.
        bucket - the bucket of the document.
        expiration - the TTL of the whole enclosing document.
        cas - the cas value for the operation
        observable - the observable which receives responses.
        Throws:
        NullPointerException - if the path is null (see AbstractSubdocRequest.EXCEPTION_NULL_PATH)
    • Method Detail

      • expiration

        public int expiration()
        Specified by:
        expiration in interface BinarySubdocMutationRequest
        Returns:
        the expiration (or TTL) to apply to the document along the mutation, 0 for no TTL.
      • createIntermediaryPath

        public void createIntermediaryPath​(boolean createIntermediaryPath)
        Modifies the request so that it requires the creation of missing intermediary nodes in the path if set to true.
        Parameters:
        createIntermediaryPath - true if missing intermediary nodes in the path should be created, false if they should be considered as errors.
      • xattr

        public void xattr​(boolean xattr)
      • expandMacros

        public void expandMacros​(boolean expandMacros)
      • cas

        public long cas()
        Specified by:
        cas in interface BinarySubdocMutationRequest
        Returns:
        the CAS to use for the mutation (if needed) or 0L to ignore
      • createDocument

        public void createDocument​(boolean createDocument)
      • upsertDocument

        public void upsertDocument​(boolean upsertDocument)
      • insertDocument

        public void insertDocument​(boolean insertDocument)