public interface CouchbaseRequest extends CouchbaseMessage
CouchbaseRequest
s.Modifier and Type | Method and Description |
---|---|
String |
bucket()
The associated bucket name for this request.
|
void |
complete()
Completes the underlying state holder.
|
String |
dispatchHostname() |
void |
dispatchHostname(String hostname) |
void |
emit(CouchbaseResponse response)
Emits the
CouchbaseResponse into the underlying state holder (like a subject)
without completing it as per contract. |
void |
fail(Throwable throwable)
Fails the
CouchbaseResponse on the state holder as per contract. |
int |
incrementRetryCount()
Returns the old retry count and increments it by one.
|
boolean |
isActive()
Checks if the request is unsubscribed on a timeout
|
String |
lastLocalId() |
void |
lastLocalId(String localId) |
String |
lastLocalSocket() |
void |
lastLocalSocket(String local) |
String |
lastRemoteSocket() |
void |
lastRemoteSocket(String remote) |
long |
maxRetryDuration()
Returns the maximum retry duration for the request.
|
void |
maxRetryDuration(long duration)
Sets the maximum retry duration for the request.
|
rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> |
observable()
Get the underlying
Observable . |
String |
operationId()
A unique operation id, used for tracing purposes.
|
String |
password()
The password associated with the bucket/ user
|
long |
retryAfter()
Gets the initial retry after time for the request.
|
void |
retryAfter(long after)
Sets the initial retry after time for the request.
|
int |
retryCount()
Returns the current retry count.
|
Delay |
retryDelay()
Returns the retry delay config
|
void |
retryDelay(Delay delay)
Sets the retry delay config
|
io.opentracing.Span |
span()
Returns the
Span for this request if set. |
void |
span(io.opentracing.Span span,
CoreEnvironment env)
Allows to set a custom span that should be used.
|
void |
subscriber(rx.Subscriber subscriber)
Optionally add subscriber to check for the timeouts
|
void |
succeed(CouchbaseResponse response)
Emits the
CouchbaseResponse into the underlying state holder (like a subject)
and completes it as well per contract. |
String |
username()
User authorized for bucket access
|
creationTime
rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable()
Observable
.void emit(CouchbaseResponse response)
CouchbaseResponse
into the underlying state holder (like a subject)
without completing it as per contract.response
- the response to emit.void complete()
void succeed(CouchbaseResponse response)
CouchbaseResponse
into the underlying state holder (like a subject)
and completes it as well per contract.
Its basically a shortcut for emit(CouchbaseResponse)
followed by complete()
.response
- the response to emit and complete.void fail(Throwable throwable)
CouchbaseResponse
on the state holder as per contract.throwable
- the throwable to fail the response with.String bucket()
String username()
String password()
int incrementRetryCount()
int retryCount()
void retryAfter(long after)
after
- long retryAfter()
void maxRetryDuration(long duration)
duration
- long maxRetryDuration()
void retryDelay(Delay delay)
delay
- Delay retryDelay()
@InterfaceAudience.Private @InterfaceStability.Uncommitted boolean isActive()
@InterfaceAudience.Private @InterfaceStability.Uncommitted void subscriber(rx.Subscriber subscriber)
String dispatchHostname()
void dispatchHostname(String hostname)
io.opentracing.Span span()
Span
for this request if set.void span(io.opentracing.Span span, CoreEnvironment env)
span
- the span to use.env
- the core env used for context-sensitive stuff, may be null.String operationId()
String lastLocalSocket()
String lastRemoteSocket()
String lastLocalId()
void lastLocalSocket(String local)
void lastRemoteSocket(String remote)
void lastLocalId(String localId)
Copyright © 2019 Couchbase, Inc.. All rights reserved.