public abstract class PooledService extends AbstractStateMachine<LifecycleState> implements Service
A generic implementation of a service pool.
Service.EndpointFactory
Modifier and Type | Method and Description |
---|---|
rx.Observable<LifecycleState> |
connect()
|
rx.Observable<LifecycleState> |
disconnect()
|
protected List<Endpoint> |
endpoints()
Returns the current endpoint list, for testing verification purposes.
|
rx.Observable<EndpointHealth> |
healthCheck()
Returns endpoint health information for all endpoints this service is currently associated with.
|
BucketServiceMapping |
mapping()
Returns the mapping for the given
Service . |
void |
send(CouchbaseRequest request)
Sends a
CouchbaseRequest into the service and eventually returns a CouchbaseResponse . |
hasSubscribers, isState, state, states, transitionState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasSubscribers, isState, state, states
public rx.Observable<LifecycleState> connect()
Service
public rx.Observable<LifecycleState> disconnect()
Service
disconnect
in interface Service
Service
after the disconnect process for all enabled Endpoint
s.public void send(CouchbaseRequest request)
Service
Sends a CouchbaseRequest
into the service and eventually returns a CouchbaseResponse
.
The CouchbaseResponse
is not returned directly, but is wrapped into a Observable
.
public rx.Observable<EndpointHealth> healthCheck()
Service
Returns endpoint health information for all endpoints this service is currently associated with.
healthCheck
in interface Service
public BucketServiceMapping mapping()
Service
Returns the mapping for the given Service
.
Copyright © 2017 Couchbase, Inc.. All rights reserved.