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
public abstract class PooledService extends AbstractStateMachine<LifecycleState> implements Service
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<LifecycleState>
connect()
rx.Observable<EndpointHealth>
diagnostics()
Returns endpoint health information for all endpoints this service is currently associated with.rx.Observable<LifecycleState>
disconnect()
protected List<Endpoint>
endpoints()
Returns the current endpoint list, for testing verification purposes.BucketServiceMapping
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
-
-
-
-
Method Detail
-
connect
public rx.Observable<LifecycleState> connect()
Description copied from interface:Service
-
disconnect
public rx.Observable<LifecycleState> 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
public void send(CouchbaseRequest request)
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
public rx.Observable<EndpointHealth> 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
public BucketServiceMapping mapping()
Description copied from interface:Service
Returns the mapping for the givenService
.
-
-