public abstract class AbstractLazyService extends AbstractDynamicService
This service lazily creates an Endpoint if needed and reuses it.
If no storedEndpoint is currently found, a new one is created and stored - the request is dispatched to it. When subsequent requests come along they are dispatched to the same storedEndpoint. If the storedEndpoint dies for some reason it is cleaned up and a new one is created on the next attempt.
Service.EndpointFactory| Constructor and Description |
|---|
AbstractLazyService(String hostname,
String bucket,
String password,
int port,
CoreEnvironment env,
com.lmax.disruptor.RingBuffer<ResponseEvent> responseBuffer,
Service.EndpointFactory endpointFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispatch(CouchbaseRequest request) |
connect, createEndpoint, disconnect, endpoints, endpointStates, logIdent, mapping, send, whenStatehasSubscribers, isState, state, states, transitionStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasSubscribers, isState, state, statespublic AbstractLazyService(String hostname, String bucket, String password, int port, CoreEnvironment env, com.lmax.disruptor.RingBuffer<ResponseEvent> responseBuffer, Service.EndpointFactory endpointFactory)
protected void dispatch(CouchbaseRequest request)
dispatch in class AbstractDynamicServiceCopyright © 2016 Couchbase, Inc.. All rights reserved.