public class JsonStringTranscoder extends AbstractTranscoder<JsonStringDocument,String>
A transcoder to encode and decode JsonStringDocuments.
| Constructor and Description |
|---|
JsonStringTranscoder() |
| Modifier and Type | Method and Description |
|---|---|
Class<JsonStringDocument> |
documentType() |
protected JsonStringDocument |
doDecode(String id,
com.couchbase.client.deps.io.netty.buffer.ByteBuf content,
long cas,
int expiry,
int flags,
com.couchbase.client.core.message.ResponseStatus status)
Perform the decoding of the received response.
|
protected com.couchbase.client.core.lang.Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,Integer> |
doEncode(JsonStringDocument document)
Perform the encoding of the request document.
|
JsonStringDocument |
newDocument(String id,
int expiry,
String content,
long cas) |
decode, encode, shouldAutoReleaseOnDecode, shouldAutoReleaseOnErrorprotected JsonStringDocument doDecode(String id, com.couchbase.client.deps.io.netty.buffer.ByteBuf content, long cas, int expiry, int flags, com.couchbase.client.core.message.ResponseStatus status) throws Exception
AbstractTranscoderPerform the decoding of the received response.
doDecode in class AbstractTranscoder<JsonStringDocument,String>id - the id of the document.content - the encoded content of the document.cas - the cas value of the document.expiry - the expiration time of the document.flags - the flags set on the document.status - the response status.Exception - if something goes wrong during the decode process.protected com.couchbase.client.core.lang.Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,Integer> doEncode(JsonStringDocument document) throws Exception
AbstractTranscoderPerform the encoding of the request document.
doEncode in class AbstractTranscoder<JsonStringDocument,String>document - the document to encode.Exception - if something goes wrong during the encode process.public JsonStringDocument newDocument(String id, int expiry, String content, long cas)
public Class<JsonStringDocument> documentType()
Copyright © 2014 Couchbase, Inc.