Package org.elasticsearch.gateway
Class MetaStateService
- java.lang.Object
-
- org.elasticsearch.gateway.MetaStateService
-
public class MetaStateService extends java.lang.Object
Handles writing and loading bothMetaData
andIndexMetaData
-
-
Constructor Summary
Constructors Constructor Description MetaStateService(NodeEnvironment nodeEnv, NamedXContentRegistry namedXContentRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexMetaData
loadIndexState(Index index)
Loads the index state for the provided index name, returning null if doesn't exists.void
writeIndex(java.lang.String reason, IndexMetaData indexMetaData)
Writes the index state.
-
-
-
Constructor Detail
-
MetaStateService
public MetaStateService(NodeEnvironment nodeEnv, NamedXContentRegistry namedXContentRegistry)
-
-
Method Detail
-
loadIndexState
@Nullable public IndexMetaData loadIndexState(Index index) throws java.io.IOException
Loads the index state for the provided index name, returning null if doesn't exists.- Throws:
java.io.IOException
-
writeIndex
public void writeIndex(java.lang.String reason, IndexMetaData indexMetaData) throws java.io.IOException
Writes the index state. This method is public for testing purposes.- Throws:
java.io.IOException
-
-