Package org.elasticsearch.gateway
Class MetaStateService
- java.lang.Object
-
- org.elasticsearch.gateway.MetaStateService
-
public class MetaStateService extends java.lang.ObjectHandles writing and loading bothMetaDataandIndexMetaData
-
-
Constructor Summary
Constructors Constructor Description MetaStateService(NodeEnvironment nodeEnv, NamedXContentRegistry namedXContentRegistry)
-
Method Summary
Modifier and Type Method Description IndexMetaDataloadIndexState(Index index)Loads the index state for the provided index name, returning null if doesn't exists.voidwriteIndex(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.IOExceptionWrites the index state. This method is public for testing purposes.- Throws:
java.io.IOException
-
-