public abstract class AbstractKeyValueRequest extends AbstractCouchbaseRequest implements BinaryRequest
Default implementation of a BinaryRequest.
| Modifier and Type | Field and Description |
|---|---|
protected static short |
DEFAULT_PARTITION |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractKeyValueRequest(String key,
String bucket,
String password)
Creates a new
AbstractKeyValueRequest. |
protected |
AbstractKeyValueRequest(String key,
String bucket,
String password,
Subject<CouchbaseResponse,CouchbaseResponse> observable)
Creates a new
AbstractKeyValueRequest. |
| Modifier and Type | Method and Description |
|---|---|
String |
key()
The key of the document.
|
byte[] |
keyBytes()
The raw byte representation of the key.
|
int |
opaque()
A opaque value representing this request.
|
short |
partition()
The partition (vbucket) to use for this request.
|
BinaryRequest |
partition(short partition)
Set the partition ID.
|
bucket, creationTime, incrementRetryCount, observable, password, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbucket, incrementRetryCount, observable, passwordcreationTimeprotected static final short DEFAULT_PARTITION
protected AbstractKeyValueRequest(String key, String bucket, String password)
Creates a new AbstractKeyValueRequest.
key - the key of the document.bucket - the bucket of the document.password - the optional password of the bucket.protected AbstractKeyValueRequest(String key, String bucket, String password, Subject<CouchbaseResponse,CouchbaseResponse> observable)
Creates a new AbstractKeyValueRequest.
key - the key of the document.bucket - the bucket of the document.password - the optional password of the bucket.observable - the observable which receives responses.public String key()
BinaryRequestThe key of the document.
key in interface BinaryRequestpublic byte[] keyBytes()
BinaryRequestThe raw byte representation of the key.
keyBytes in interface BinaryRequestpublic short partition()
BinaryRequestThe partition (vbucket) to use for this request.
partition in interface BinaryRequestpublic BinaryRequest partition(short partition)
BinaryRequestSet the partition ID.
partition in interface BinaryRequestpartition - the id of the partition.BinaryRequest for proper chaining.public int opaque()
BinaryRequestA opaque value representing this request.
opaque in interface BinaryRequestCopyright © 2016 Couchbase, Inc.. All rights reserved.