public interface CouchbaseRequest extends CouchbaseMessage
High-Level marker interface for all 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()
Get the underlying Observable
.
void emit(CouchbaseResponse response)
Emits the CouchbaseResponse
into the underlying state holder (like a subject) without completing it as per contract.
response
- the response to emit.void complete()
Completes the underlying state holder.
void succeed(CouchbaseResponse response)
Emits the 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)
Fails the CouchbaseResponse
on the state holder as per contract.
throwable
- the throwable to fail the response with.String bucket()
The associated bucket name for this request.
String username()
User authorized for bucket access
String password()
The password associated with the bucket/ user
int incrementRetryCount()
Returns the old retry count and increments it by one.
int retryCount()
Returns the current retry count.
void retryAfter(long after)
Sets the initial retry after time for the request.
after
- long retryAfter()
Gets the initial retry after time for the request.
void maxRetryDuration(long duration)
Sets the maximum retry duration for the request.
duration
- long maxRetryDuration()
Returns the maximum retry duration for the request.
void retryDelay(Delay delay)
Sets the retry delay config
delay
- Delay retryDelay()
Returns the retry delay config
@InterfaceAudience.Private @InterfaceStability.Uncommitted boolean isActive()
Checks if the request is unsubscribed on a timeout
@InterfaceAudience.Private @InterfaceStability.Uncommitted void subscriber(rx.Subscriber subscriber)
Optionally add subscriber to check for the timeouts
String dispatchHostname()
void dispatchHostname(String hostname)
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.
span
- the span to use.env
- the core env used for context-sensitive stuff, may be null.String operationId()
A unique operation id, used for tracing purposes.
May or may not be null depending on the service implementation.
String lastLocalSocket()
String lastRemoteSocket()
String lastLocalId()
void lastLocalSocket(String local)
void lastRemoteSocket(String remote)
void lastLocalId(String localId)
Copyright © 2018 Couchbase, Inc.. All rights reserved.