public class SerializableTranscoder extends AbstractTranscoder<SerializableDocument,Serializable>
SerializableDocuments.| Constructor and Description |
|---|
SerializableTranscoder() |
| Modifier and Type | Method and Description |
|---|---|
Class<SerializableDocument> |
documentType() |
protected SerializableDocument |
doDecode(String id,
com.couchbase.client.deps.io.netty.buffer.ByteBuf content,
long cas,
int expiry,
int flags,
ResponseStatus status)
Perform the decoding of the received response.
|
protected Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,Integer> |
doEncode(SerializableDocument document)
Perform the encoding of the request document.
|
SerializableDocument |
newDocument(String id,
int expiry,
Serializable content,
long cas)
Creates a new Document with the passed in information.
|
SerializableDocument |
newDocument(String id,
int expiry,
Serializable content,
long cas,
MutationToken mutationToken)
Default implementation for backwards compatibility.
|
decode, encode, shouldAutoReleaseOnDecode, shouldAutoReleaseOnErrorprotected SerializableDocument doDecode(String id, com.couchbase.client.deps.io.netty.buffer.ByteBuf content, long cas, int expiry, int flags, ResponseStatus status) throws Exception
AbstractTranscoderdoDecode in class AbstractTranscoder<SerializableDocument,Serializable>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 Tuple2<com.couchbase.client.deps.io.netty.buffer.ByteBuf,Integer> doEncode(SerializableDocument document) throws Exception
AbstractTranscoderdoEncode in class AbstractTranscoder<SerializableDocument,Serializable>document - the document to encode.Exception - if something goes wrong during the encode process.public SerializableDocument newDocument(String id, int expiry, Serializable content, long cas)
TranscoderTranscoder.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 SerializableDocument newDocument(String id, int expiry, Serializable content, long cas, MutationToken mutationToken)
AbstractTranscodernewDocument in interface Transcoder<SerializableDocument,Serializable>newDocument in class AbstractTranscoder<SerializableDocument,Serializable>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<SerializableDocument> documentType()
Copyright © 2015 Couchbase, Inc.