public class JsonBooleanTranscoder extends AbstractTranscoder<JsonBooleanDocument,Boolean>
A transcoder to encode and decode JsonBooleanDocument
s.
Constructor and Description |
---|
JsonBooleanTranscoder() |
Modifier and Type | Method and Description |
---|---|
Class<JsonBooleanDocument> |
documentType() |
protected JsonBooleanDocument |
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(JsonBooleanDocument document)
Perform the encoding of the request document.
|
JsonBooleanDocument |
newDocument(String id,
int expiry,
Boolean content,
long cas)
Creates a new Document with the passed in information.
|
JsonBooleanDocument |
newDocument(String id,
int expiry,
Boolean content,
long cas,
com.couchbase.client.core.message.kv.MutationToken mutationToken)
Default implementation for backwards compatibility.
|
decode, encode, shouldAutoReleaseOnDecode, shouldAutoReleaseOnError
protected JsonBooleanDocument 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
AbstractTranscoder
Perform the decoding of the received response.
doDecode
in class AbstractTranscoder<JsonBooleanDocument,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.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(JsonBooleanDocument document) throws Exception
AbstractTranscoder
Perform the encoding of the request document.
doEncode
in class AbstractTranscoder<JsonBooleanDocument,Boolean>
document
- the document to encode.Exception
- if something goes wrong during the encode process.public JsonBooleanDocument newDocument(String id, int expiry, Boolean content, long cas)
Transcoder
Creates a new Document with the passed in information.
Use the one with the mutation token instead (Transcoder.newDocument(String, int, Object, long, MutationToken)
).
id
- the id of the document.expiry
- the document expiration.content
- the document content.cas
- the documents cas value.public JsonBooleanDocument newDocument(String id, int expiry, Boolean content, long cas, com.couchbase.client.core.message.kv.MutationToken mutationToken)
AbstractTranscoder
Default implementation for backwards compatibility.
newDocument
in interface Transcoder<JsonBooleanDocument,Boolean>
newDocument
in class AbstractTranscoder<JsonBooleanDocument,Boolean>
id
- the id of the document.expiry
- the document expiration.content
- the document content.cas
- the documents cas value.mutationToken
- the documents mutation token.public Class<JsonBooleanDocument> documentType()
Copyright © 2014 Couchbase, Inc.