Class SearchService
java.lang.Object
com.couchbase.client.core.service.SearchService
- All Implemented Interfaces:
Service,Stateful<ServiceState>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe interval when to check if idle sockets are to be cleaned up. -
Constructor Summary
ConstructorsConstructorDescriptionSearchService(SearchServiceConfig config, CoreContext context, String hostname, int port) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Instruct thisServiceto connect.context()Returns the underlying contextual metadata for this service.protected EndpointSubclass implements this method to create new endpoints.Returns diagnostics information for this service.voidInstruct thisServiceto disconnect.protected DurationCan be overridden for unit tests.protected EndpointSelectionStrategySubclass implements this method to pick their selection strategy of choice.send(R request) Sends the request into thisService.protected ServiceContextReturns the createdServiceContextfor implementations to use.state()Returns the current state of the stateful component.reactor.core.publisher.Flux<ServiceState> states()Returns a stream of states for this component as they change.type()Represents the service type for this service.
-
Field Details
-
DEFAULT_IDLE_TIME_CHECK_INTERVAL
The interval when to check if idle sockets are to be cleaned up.
-
-
Constructor Details
-
SearchService
-
-
Method Details
-
createEndpoint
Subclass implements this method to create new endpoints.- Returns:
- the created endpoint.
-
selectionStrategy
Subclass implements this method to pick their selection strategy of choice.- Returns:
- the selection strategy.
-
type
Description copied from interface:ServiceRepresents the service type for this service. -
serviceContext
Returns the createdServiceContextfor implementations to use. -
idleTimeCheckInterval
Can be overridden for unit tests. -
send
Description copied from interface:ServiceSends the request into thisService.Note that there is no guarantee that the request will actually dispatched, based on the state this service is in.
-
connect
public void connect()Description copied from interface:ServiceInstruct thisServiceto 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.
-
disconnect
public void disconnect()Description copied from interface:ServiceInstruct thisServiceto 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:
disconnectin interfaceService
-
context
Description copied from interface:ServiceReturns the underlying contextual metadata for this service. -
state
Description copied from interface:StatefulReturns the current state of the stateful component.- Specified by:
statein interfaceStateful<ServiceState>
-
states
Description copied from interface:StatefulReturns a stream of states for this component as they change.- Specified by:
statesin interfaceStateful<ServiceState>
-
diagnostics
Description copied from interface:ServiceReturns diagnostics information for this service.- Specified by:
diagnosticsin interfaceService
-
internalDiagnostics
- Specified by:
internalDiagnosticsin interfaceService
-