Package org.elasticsearch.gateway
Class MockGatewayMetaState
- java.lang.Object
-
- org.elasticsearch.gateway.GatewayMetaState
-
- org.elasticsearch.gateway.MockGatewayMetaState
-
- All Implemented Interfaces:
ClusterStateApplier
,CoordinationState.PersistedState
public class MockGatewayMetaState extends GatewayMetaState
GatewayMetaState
constructor accepts a lot of arguments. It's not always easy / convenient to construct these dependencies. This class constructor takes far fewer dependencies and constructs usableGatewayMetaState
with 2 restrictions: no metadata upgrade will be performed and no cluster state updaters will be run. This is sufficient for most of the tests.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.gateway.GatewayMetaState
GatewayMetaState.IndexMetaDataAction, GatewayMetaState.KeepPreviousGeneration, GatewayMetaState.WriteChangedIndexMetaData, GatewayMetaState.WriteNewIndexMetaData
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.gateway.GatewayMetaState
incrementalWrite, logger, previousClusterState, previousManifest
-
-
Constructor Summary
Constructors Constructor Description MockGatewayMetaState(Settings settings, NodeEnvironment nodeEnvironment, NamedXContentRegistry xContentRegistry, DiscoveryNode localNode)
-
Method Summary
Modifier and Type Method Description void
applyClusterStateUpdaters()
protected void
upgradeMetaData(MetaDataIndexUpgradeService metaDataIndexUpgradeService, MetaDataUpgrader metaDataUpgrader)
-
Methods inherited from class org.elasticsearch.gateway.GatewayMetaState
applyClusterState, getCurrentTerm, getLastAcceptedState, getMetaData, getPersistedState, getRelevantIndices, resolveIndexMetaDataActions, setCurrentTerm, setLastAcceptedState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.cluster.coordination.CoordinationState.PersistedState
close, markLastAcceptedStateAsCommitted
-
-
-
-
Constructor Detail
-
MockGatewayMetaState
public MockGatewayMetaState(Settings settings, NodeEnvironment nodeEnvironment, NamedXContentRegistry xContentRegistry, DiscoveryNode localNode) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
upgradeMetaData
protected void upgradeMetaData(MetaDataIndexUpgradeService metaDataIndexUpgradeService, MetaDataUpgrader metaDataUpgrader)
- Overrides:
upgradeMetaData
in classGatewayMetaState
-
applyClusterStateUpdaters
public void applyClusterStateUpdaters()
- Overrides:
applyClusterStateUpdaters
in classGatewayMetaState
-
-