Interface Endpoint

All Superinterfaces:
All Known Implementing Classes:
AbstractEndpoint, AnalyticsEndpoint, ConfigEndpoint, KeyValueEndpoint, QueryEndpoint, SearchEndpoint, ViewEndpoint

public interface Endpoint
extends Stateful<LifecycleState>
Represents a stateful Endpoint which abstracts the underlying channel.
Michael Nitschinger
  • Method Details

    • connect

      rx.Observable<LifecycleState> connect()
      Connect the Endpoint to the underlying channel.
      a Observable with the state after the connect process finishes.
    • disconnect

      rx.Observable<LifecycleState> disconnect()
      Disconnect the Endpoint from the underlying channel.
      a Observable with the state after the disconnect process finishes.
    • send

      void send​(CouchbaseRequest request)
      Sends a CouchbaseRequest into the endpoint and eventually returns a CouchbaseResponse.
      request - the request to send.
    • isFree

      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.
      true if free to accept a request, false otherwise.
    • lastResponse

      long lastResponse()
      Returns the timestamp of the last response completed.
    • lastConnectedAt

      long lastConnectedAt()
      Returns the epoch nano timestamp when the endpoint was last connected successfully. If never connected at all, will return 0.
    • diagnostics

      rx.Single<EndpointHealth> diagnostics​(ServiceType type)
      Returns health information for this endpoint.
    • remoteAddress

      String remoteAddress()
      Returns the remote address as String representation. Hostname and port separated by colon.