Interface CouchbaseRequest
- All Superinterfaces:
CouchbaseMessage
- All Known Subinterfaces:
AnalyticsRequest
,BinaryRequest
,BinaryStoreRequest
,BinarySubdocMultiLookupRequest
,BinarySubdocMultiMutationRequest
,BinarySubdocMutationRequest
,BinarySubdocRequest
,ClusterRequest
,ConfigRequest
,InternalRequest
,PrelocatedRequest
,QueryRequest
,SearchRequest
,ViewRequest
- All Known Implementing Classes:
AbstractCouchbaseRequest
,AbstractKeyValueRequest
,AbstractSubdocMutationRequest
,AbstractSubdocRequest
,AddNodeRequest
,AddServiceRequest
,AnalyticsHandler.KeepAliveRequest
,AnalyticsHandlerV2.KeepAliveRequest
,AnalyticsQueryResultRequest
,AnalyticsQueryStatusRequest
,AppendRequest
,BucketConfigRequest
,BucketsConfigRequest
,BucketStreamingRequest
,CloseBucketRequest
,ClusterConfigRequest
,CounterRequest
,DiagnosticsRequest
,DisconnectRequest
,FlushRequest
,GenericAnalyticsRequest
,GenericQueryRequest
,GetAllMutationTokensRequest
,GetBucketConfigRequest
,GetClusterConfigRequest
,GetConfigProviderRequest
,GetDesignDocumentRequest
,GetDesignDocumentsRequest
,GetRequest
,GetSearchIndexRequest
,GetUsersRequest
,InsertBucketRequest
,InsertRequest
,KeyValueHandler.KeepAliveRequest
,NoopRequest
,ObserveRequest
,ObserveSeqnoRequest
,OpenBucketRequest
,PingRequest
,PingRequest
,PingRequest
,PingRequest
,PrependRequest
,QueryHandler.KeepAliveRequest
,QueryHandlerV2.KeepAliveRequest
,RawAnalyticsRequest
,RawQueryRequest
,RemoveBucketRequest
,RemoveDesignDocumentRequest
,RemoveNodeRequest
,RemoveRequest
,RemoveSearchIndexRequest
,RemoveServiceRequest
,RemoveUserRequest
,ReplaceRequest
,ReplicaGetRequest
,RestApiRequest
,SearchHandler.KeepAliveRequest
,SearchQueryRequest
,SeedNodesRequest
,SignalConfigReload
,SignalFlush
,StatRequest
,SubArrayRequest
,SubCounterRequest
,SubDeleteRequest
,SubDictAddRequest
,SubDictUpsertRequest
,SubExistRequest
,SubGetCountRequest
,SubGetRequest
,SubMultiLookupRequest
,SubMultiMutationRequest
,SubReplaceRequest
,TouchRequest
,UnlockRequest
,UpdateBucketRequest
,UpsertDesignDocumentRequest
,UpsertRequest
,UpsertSearchIndexRequest
,UpsertUserRequest
,ViewHandler.KeepAliveRequest
,ViewQueryRequest
High-Level marker interface for all
CouchbaseRequest
s.- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Method Summary
Modifier and TypeMethodDescriptionbucket()
The associated bucket name for this request.void
complete()
Completes the underlying state holder.void
dispatchHostname
(String hostname) void
emit
(CouchbaseResponse response) Emits theCouchbaseResponse
into the underlying state holder (like a subject) without completing it as per contract.void
Fails theCouchbaseResponse
on the state holder as per contract.int
Returns the old retry count and increments it by one.boolean
isActive()
Checks if the request is unsubscribed on a timeoutvoid
lastLocalId
(String localId) void
lastLocalSocket
(String local) void
lastRemoteSocket
(String remote) long
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> Get the underlyingObservable
.A unique operation id, used for tracing purposes.password()
The password associated with the bucket/ userlong
Gets the initial retry after time for the request.void
retryAfter
(long after) Sets the initial retry after time for the request.int
Returns the current retry count.Returns the retry delay configvoid
retryDelay
(Delay delay) Sets the retry delay configio.opentracing.Span
span()
Returns theSpan
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 timeoutsvoid
succeed
(CouchbaseResponse response) Emits theCouchbaseResponse
into the underlying state holder (like a subject) and completes it as well per contract.username()
User authorized for bucket accessMethods inherited from interface com.couchbase.client.core.message.CouchbaseMessage
creationTime
-
Method Details
-
observable
rx.subjects.Subject<CouchbaseResponse,CouchbaseResponse> observable()Get the underlyingObservable
.- Returns:
- the observable which will complete the response.
-
emit
Emits theCouchbaseResponse
into the underlying state holder (like a subject) without completing it as per contract.- Parameters:
response
- the response to emit.
-
complete
void complete()Completes the underlying state holder. -
succeed
Emits theCouchbaseResponse
into the underlying state holder (like a subject) and completes it as well per contract. Its basically a shortcut foremit(CouchbaseResponse)
followed bycomplete()
.- Parameters:
response
- the response to emit and complete.
-
fail
Fails theCouchbaseResponse
on the state holder as per contract.- Parameters:
throwable
- the throwable to fail the response with.
-
bucket
String bucket()The associated bucket name for this request.- Returns:
- the bucket name.
-
username
String username()User authorized for bucket access -
password
String password()The password associated with the bucket/ user- Returns:
- the password.
-
incrementRetryCount
int incrementRetryCount()Returns the old retry count and increments it by one.- Returns:
- the old retryCount.
-
retryCount
int retryCount()Returns the current retry count.- Returns:
- the current retry count.
-
retryAfter
void retryAfter(long after) Sets the initial retry after time for the request.- Parameters:
after
-
-
retryAfter
long retryAfter()Gets the initial retry after time for the request. -
maxRetryDuration
void maxRetryDuration(long duration) Sets the maximum retry duration for the request.- Parameters:
duration
-
-
maxRetryDuration
long maxRetryDuration()Returns the maximum retry duration for the request.- Returns:
- duration
-
retryDelay
Sets the retry delay config- Parameters:
delay
-
-
retryDelay
Delay retryDelay()Returns the retry delay config- Returns:
- delay
-
isActive
Checks if the request is unsubscribed on a timeout- Returns:
- false if timed out, else true
-
subscriber
Optionally add subscriber to check for the timeouts -
dispatchHostname
String dispatchHostname() -
dispatchHostname
-
span
io.opentracing.Span span()Returns theSpan
for this request if set.- Returns:
- the span used.
-
span
Allows to set a custom span that should be used.- Parameters:
span
- the span to use.env
- the core env used for context-sensitive stuff, may be null.
-
operationId
String operationId()A unique operation id, used for tracing purposes. May or may not be null depending on the service implementation.- Returns:
- the operation id or null.
-
lastLocalSocket
String lastLocalSocket() -
lastRemoteSocket
String lastRemoteSocket() -
lastLocalId
String lastLocalId() -
lastLocalSocket
-
lastRemoteSocket
-
lastLocalId
-