Package com.couchbase.client.core.node
Class ServiceStateZipper
- java.lang.Object
-
- com.couchbase.client.core.state.AbstractStateMachine<S>
-
- com.couchbase.client.core.state.AbstractStateZipper<Service,LifecycleState>
-
- com.couchbase.client.core.node.ServiceStateZipper
-
- All Implemented Interfaces:
Stateful<LifecycleState>
,StateZipper<Service,LifecycleState>
public class ServiceStateZipper extends AbstractStateZipper<Service,LifecycleState>
Calculates a merged state for all registered services.- Since:
- 1.1.1
- Author:
- Michael Nitschinger
-
-
Constructor Summary
Constructors Constructor Description ServiceStateZipper(LifecycleState initial)
-
Method Summary
All Methods Instance Methods Concrete Methods 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 Detail
-
ServiceStateZipper
public ServiceStateZipper(LifecycleState initial)
-
-
Method Detail
-
zipWith
protected LifecycleState zipWith(Collection<LifecycleState> states)
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<Service,LifecycleState>
- Parameters:
states
- all subscribed states.- Returns:
- the zipped state which represents the zipper state.
-
-