Class SearchService

java.lang.Object
com.couchbase.client.core.service.SearchService
All Implemented Interfaces:
Service, Stateful<ServiceState>

public class SearchService extends Object
  • Field Details

    • DEFAULT_IDLE_TIME_CHECK_INTERVAL

      public static final Duration DEFAULT_IDLE_TIME_CHECK_INTERVAL
      The interval when to check if idle sockets are to be cleaned up.
  • Constructor Details

  • Method Details

    • createEndpoint

      protected Endpoint createEndpoint()
      Subclass implements this method to create new endpoints.
      Returns:
      the created endpoint.
    • selectionStrategy

      protected EndpointSelectionStrategy selectionStrategy()
      Subclass implements this method to pick their selection strategy of choice.
      Returns:
      the selection strategy.
    • type

      public ServiceType type()
      Description copied from interface: Service
      Represents the service type for this service.
    • serviceContext

      protected ServiceContext serviceContext()
      Returns the created ServiceContext for implementations to use.
    • idleTimeCheckInterval

      protected Duration idleTimeCheckInterval()
      Can be overridden for unit tests.
    • send

      public <R extends Request<? extends Response>> void send(R request)
      Description copied from interface: Service
      Sends the request into this Service.

      Note that there is no guarantee that the request will actually dispatched, based on the state this service is in.

      Specified by:
      send in interface Service
      Parameters:
      request - the request to send.
    • connect

      public void connect()
      Description copied from interface: Service
      Instruct this Service to connect.

      This method is async and will return immediately. Use the other methods available to inspect the current state of the service, signaling potential successful connection attempts.

      Specified by:
      connect in interface Service
    • disconnect

      public void disconnect()
      Description copied from interface: Service
      Instruct this Service to disconnect.

      This method is async and will return immediately. Use the other methods available to inspect the current state of the service, signaling potential successful disconnection attempts.

      Specified by:
      disconnect in interface Service
    • context

      public ServiceContext context()
      Description copied from interface: Service
      Returns the underlying contextual metadata for this service.
      Specified by:
      context in interface Service
    • state

      public ServiceState state()
      Description copied from interface: Stateful
      Returns the current state of the stateful component.
      Specified by:
      state in interface Stateful<ServiceState>
    • states

      public Flux<ServiceState> states()
      Description copied from interface: Stateful
      Returns a stream of states for this component as they change.
      Specified by:
      states in interface Stateful<ServiceState>
    • diagnostics

      public Stream<EndpointDiagnostics> diagnostics()
      Description copied from interface: Service
      Returns diagnostics information for this service.
      Specified by:
      diagnostics in interface Service
    • internalDiagnostics

      public Stream<InternalEndpointDiagnostics> internalDiagnostics()
      Specified by:
      internalDiagnostics in interface Service