Class EndpointStateZipper
java.lang.Object
com.couchbase.client.core.state.AbstractStateMachine<S>
com.couchbase.client.core.state.AbstractStateZipper<Endpoint,LifecycleState>
com.couchbase.client.core.service.EndpointStateZipper
- All Implemented Interfaces:
Stateful<LifecycleState>
,StateZipper<Endpoint,LifecycleState>
public class EndpointStateZipper extends AbstractStateZipper<Endpoint,LifecycleState>
Calculates a merged state for all registered endpoints.
- Since:
- 1.1.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description EndpointStateZipper(LifecycleState initial)
-
Method Summary
Modifier and Type Method Description protected LifecycleState
zipWith(Collection<LifecycleState> states)
The zip function to map from N states to one that represents the state of the zipper.Methods inherited from class com.couchbase.client.core.state.AbstractStateZipper
currentStates, currentSubscriptions, deregister, register, terminate
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
-
Constructor Details
-
EndpointStateZipper
-
-
Method Details
-
zipWith
Description copied from class:AbstractStateZipper
The zip function to map from N states to one that represents the state of the zipper.- Specified by:
zipWith
in classAbstractStateZipper<Endpoint,LifecycleState>
- Parameters:
states
- all subscribed states.- Returns:
- the zipped state which represents the zipper state.
-