public interface Endpoint extends Stateful<LifecycleState>
Represents a stateful Endpoint
which abstracts the underlying channel.
Modifier and Type | Method and Description |
---|---|
rx.Observable<LifecycleState> |
connect()
Connect the
Endpoint to the underlying channel. |
rx.Single<EndpointHealth> |
diagnostics(ServiceType type)
Returns health information for this endpoint.
|
rx.Observable<LifecycleState> |
disconnect()
Disconnect the
Endpoint from the underlying channel. |
boolean |
isFree()
If this endpoint is free to take a request.
|
long |
lastResponse()
Returns the timestamp of the last response completed.
|
String |
remoteAddress()
Returns the remote address as String representation.
|
void |
send(CouchbaseRequest request)
Sends a
CouchbaseRequest into the endpoint and eventually returns a CouchbaseResponse . |
hasSubscribers, isState, state, states
rx.Observable<LifecycleState> connect()
Connect the Endpoint
to the underlying channel.
Observable
with the state after the connect process finishes.rx.Observable<LifecycleState> disconnect()
Disconnect the Endpoint
from the underlying channel.
Observable
with the state after the disconnect process finishes.void send(CouchbaseRequest request)
Sends a CouchbaseRequest
into the endpoint and eventually returns a CouchbaseResponse
.
request
- the request to send.boolean isFree()
If this endpoint is free to take a request. This is especially important in non-pipelined endpoint cases since if a request is in-flight this will return false.
long lastResponse()
Returns the timestamp of the last response completed.
rx.Single<EndpointHealth> diagnostics(ServiceType type)
Returns health information for this endpoint.
String remoteAddress()
Returns the remote address as String representation. Hostname and port separated by colon.
Copyright © 2018 Couchbase, Inc.. All rights reserved.