Interface Transcoder<D extends Document<T>,​T>

    • Method Detail

      • decode

        D decode​(String id,
                 com.couchbase.client.deps.io.netty.buffer.ByteBuf content,
                 long cas,
                 int expiry,
                 int flags,
                 ResponseStatus status)
      • encode

        Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,​Integer> encode​(D document)
      • newDocument

        @Deprecated
        D newDocument​(String id,
                      int expiry,
                      T content,
                      long cas)
        Deprecated.
        Creates a new Document with the passed in information. Use the one with the mutation token instead (newDocument(String, int, Object, long, MutationToken)).
        Parameters:
        id - the id of the document.
        expiry - the document expiration.
        content - the document content.
        cas - the documents cas value.
        Returns:
        the created document.
      • newDocument

        D newDocument​(String id,
                      int expiry,
                      T content,
                      long cas,
                      MutationToken mutationToken)
        Creates a new Document with the passed in information.
        Parameters:
        id - the id of the document.
        expiry - the document expiration.
        content - the document content.
        cas - the documents cas value.
        mutationToken - the documents mutation token.
        Returns:
        the created document.
      • documentType

        Class<D> documentType()