Class PooledService
java.lang.Object
com.couchbase.client.core.state.AbstractStateMachine<LifecycleState>
com.couchbase.client.core.service.PooledService
- All Implemented Interfaces:
Service
,Stateful<LifecycleState>
- Direct Known Subclasses:
AnalyticsService
,KeyValueService
,QueryService
,SearchService
,ViewService
A generic implementation of a service pool.
- Since:
- 1.4.2
- Author:
- Michael Nitschinger
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.couchbase.client.core.service.Service
Service.EndpointFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The interval when to check if idle sockets are to be cleaned up. -
Method Summary
Modifier and TypeMethodDescriptionrx.Observable<LifecycleState>
connect()
rx.Observable<EndpointHealth>
Returns endpoint health information for all endpoints this service is currently associated with.rx.Observable<LifecycleState>
Returns the current endpoint list, for testing verification purposes.mapping()
Returns the mapping for the givenService
.void
send
(CouchbaseRequest request) Sends aCouchbaseRequest
into the service and eventually returns aCouchbaseResponse
.Methods inherited from class com.couchbase.client.core.state.AbstractStateMachine
hasSubscribers, isState, state, states, transitionState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.couchbase.client.core.state.Stateful
hasSubscribers, isState, state, states
-
Field Details
-
DEFAULT_IDLE_TIME_CHECK_INTERVAL_MS
public static final int DEFAULT_IDLE_TIME_CHECK_INTERVAL_MSThe interval when to check if idle sockets are to be cleaned up.- See Also:
-
-
Method Details
-
connect
Description copied from interface:Service
-
disconnect
Description copied from interface:Service
- Specified by:
disconnect
in interfaceService
- Returns:
- the states of the
Service
after the disconnect process for all enabledEndpoint
s.
-
send
Description copied from interface:Service
Sends aCouchbaseRequest
into the service and eventually returns aCouchbaseResponse
. TheCouchbaseResponse
is not returned directly, but is wrapped into aObservable
. -
diagnostics
Description copied from interface:Service
Returns endpoint health information for all endpoints this service is currently associated with.- Specified by:
diagnostics
in interfaceService
-
mapping
Description copied from interface:Service
Returns the mapping for the givenService
. -
endpoints
Returns the current endpoint list, for testing verification purposes.
-