public abstract class AbstractKeyValueRequest extends AbstractCouchbaseRequest implements BinaryRequest
BinaryRequest
.Modifier and Type | Field and Description |
---|---|
protected static short |
DEFAULT_PARTITION |
Modifier | Constructor and Description |
---|---|
protected |
AbstractKeyValueRequest(String key,
String bucket)
Creates a new
AbstractKeyValueRequest . |
protected |
AbstractKeyValueRequest(String key,
String bucket,
String password)
Creates a new
AbstractKeyValueRequest . |
protected |
AbstractKeyValueRequest(String key,
String bucket,
String username,
String password)
Creates a new
AbstractKeyValueRequest . |
protected |
AbstractKeyValueRequest(String key,
String bucket,
String username,
String password,
rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable)
Creates a new
AbstractKeyValueRequest . |
Modifier and Type | Method and Description |
---|---|
protected void |
afterSpanSet(io.opentracing.Span span)
Use this method to add custom span values on insert.
|
boolean |
hasSeenNotMyVbucket()
Returns true if this operation has been rejected at least once because of a KV not my vbucket operation.
|
String |
key()
The key of the document.
|
byte[] |
keyBytes()
The raw byte representation of the key.
|
int |
opaque()
A opaque value representing this request.
|
String |
operationId()
Default implementation, sub requests need to override this.
|
short |
partition()
The partition (vbucket) to use for this request.
|
BinaryRequest |
partition(short partition)
Set the partition ID.
|
void |
sawNotMyVbucket()
This method should be called if during response parsing, a NMVB response got returned from the server.
|
bucket, complete, creationTime, dispatchHostname, dispatchHostname, emit, fail, incrementRetryCount, isActive, lastLocalId, lastLocalId, lastLocalSocket, lastLocalSocket, lastRemoteSocket, lastRemoteSocket, maxRetryDuration, maxRetryDuration, observable, password, retryAfter, retryAfter, retryCount, retryDelay, retryDelay, span, span, subscriber, succeed, toString, username
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
bucket, complete, dispatchHostname, dispatchHostname, emit, fail, incrementRetryCount, isActive, lastLocalId, lastLocalId, lastLocalSocket, lastLocalSocket, lastRemoteSocket, lastRemoteSocket, maxRetryDuration, maxRetryDuration, observable, password, retryAfter, retryAfter, retryCount, retryDelay, retryDelay, span, span, subscriber, succeed, username
creationTime
protected static final short DEFAULT_PARTITION
protected AbstractKeyValueRequest(String key, String bucket)
AbstractKeyValueRequest
.key
- the key of the document.bucket
- the bucket of the document.protected AbstractKeyValueRequest(String key, String bucket, String password)
AbstractKeyValueRequest
.key
- the key of the document.bucket
- the bucket of the document.password
- the password for the bucket.protected AbstractKeyValueRequest(String key, String bucket, String username, String password)
AbstractKeyValueRequest
.key
- the key of the document.bucket
- the bucket of the document.username
- the user authorized for bucket access.password
- the password for the user.protected AbstractKeyValueRequest(String key, String bucket, String username, String password, rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable)
AbstractKeyValueRequest
.key
- the key of the document.bucket
- the bucket of the document.username
- the user authorized for bucket access.password
- the optional password of the user.observable
- the observable which receives responses.protected void afterSpanSet(io.opentracing.Span span)
AbstractCouchbaseRequest
afterSpanSet
in class AbstractCouchbaseRequest
public String key()
BinaryRequest
key
in interface BinaryRequest
public byte[] keyBytes()
BinaryRequest
keyBytes
in interface BinaryRequest
public short partition()
BinaryRequest
partition
in interface BinaryRequest
public BinaryRequest partition(short partition)
BinaryRequest
partition
in interface BinaryRequest
partition
- the id of the partition.BinaryRequest
for proper chaining.public int opaque()
BinaryRequest
opaque
in interface BinaryRequest
public String operationId()
AbstractCouchbaseRequest
operationId
in interface CouchbaseRequest
operationId
in class AbstractCouchbaseRequest
public boolean hasSeenNotMyVbucket()
BinaryRequest
hasSeenNotMyVbucket
in interface BinaryRequest
public void sawNotMyVbucket()
BinaryRequest
sawNotMyVbucket
in interface BinaryRequest
Copyright © 2021 Couchbase, Inc.. All rights reserved.