public class InsertRequest extends AbstractKeyValueRequest implements BinaryStoreRequest
Insert a document.
DEFAULT_PARTITION| Constructor and Description |
|---|
InsertRequest(String key,
ByteBuf content,
int exp,
int flags,
String bucket) |
InsertRequest(String key,
ByteBuf content,
int exp,
int flags,
String bucket,
boolean json)
Creates a new
InsertRequest. |
InsertRequest(String key,
ByteBuf content,
String bucket)
Creates a new
InsertRequest. |
InsertRequest(String key,
ByteBuf content,
String bucket,
boolean json) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
content()
The content of the document.
|
int |
expiration()
Returns the expiration time for this document.
|
int |
flags()
Returns the flags for this document.
|
boolean |
isJson() |
key, keyBytes, opaque, partition, partitionbucket, creationTime, incrementRetryCount, observable, password, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitkey, keyBytes, opaque, partition, partitionbucket, incrementRetryCount, observable, passwordcreationTimepublic InsertRequest(String key, ByteBuf content, String bucket)
Creates a new InsertRequest.
key - the key of the document.content - the content of the document.bucket - the name of the bucket.public InsertRequest(String key, ByteBuf content, int exp, int flags, String bucket, boolean json)
Creates a new InsertRequest.
key - the key of the document.content - the content of the document.exp - the expiration time.flags - optional flags.bucket - the the name of the bucket.public int expiration()
Returns the expiration time for this document.
expiration in interface BinaryStoreRequestpublic int flags()
Returns the flags for this document.
flags in interface BinaryStoreRequestpublic ByteBuf content()
The content of the document.
content in interface BinaryStoreRequestpublic boolean isJson()
isJson in interface BinaryStoreRequestCopyright © 2016 Couchbase, Inc.. All rights reserved.