public class JsonBooleanTranscoder extends AbstractTranscoder<JsonBooleanDocument,java.lang.Boolean>
A transcoder to encode and decode JsonBooleanDocument
s.
Constructor and Description |
---|
JsonBooleanTranscoder() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<JsonBooleanDocument> |
documentType() |
protected JsonBooleanDocument |
doDecode(java.lang.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,java.lang.Integer> |
doEncode(JsonBooleanDocument document)
Perform the encoding of the request document.
|
JsonBooleanDocument |
newDocument(java.lang.String id,
int expiry,
java.lang.Boolean content,
long cas) |
decode, encode
protected JsonBooleanDocument doDecode(java.lang.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 java.lang.Exception
AbstractTranscoder
Perform the decoding of the received response.
doDecode
in class AbstractTranscoder<JsonBooleanDocument,java.lang.Boolean>
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.java.lang.Exception
- if something goes wrong during the decode process.protected com.couchbase.client.core.lang.Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,java.lang.Integer> doEncode(JsonBooleanDocument document) throws java.lang.Exception
AbstractTranscoder
Perform the encoding of the request document.
doEncode
in class AbstractTranscoder<JsonBooleanDocument,java.lang.Boolean>
document
- the document to encode.java.lang.Exception
- if something goes wrong during the encode process.public JsonBooleanDocument newDocument(java.lang.String id, int expiry, java.lang.Boolean content, long cas)
public java.lang.Class<JsonBooleanDocument> documentType()