Package org.elasticsearch.gateway
Class WriteStateException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.elasticsearch.gateway.WriteStateException
-
- All Implemented Interfaces:
java.io.Serializable
public class WriteStateException extends java.io.IOException
This exception is thrown when there is a problem of writing state to disk.- See Also:
- Serialized Form
-
-
Method Summary
Modifier and Type Method Description boolean
isDirty()
If this method returns false, state is guaranteed to be not written to disk.void
rethrowAsErrorOrUncheckedException()
Rethrows thisWriteStateException
asIOError
if dirty flag is set, which will lead to JVM shutdown.
-
-
-
Method Detail
-
isDirty
public boolean isDirty()
If this method returns false, state is guaranteed to be not written to disk. If this method returns true, we don't know if state is written to disk.
-
rethrowAsErrorOrUncheckedException
public void rethrowAsErrorOrUncheckedException()
Rethrows thisWriteStateException
asIOError
if dirty flag is set, which will lead to JVM shutdown. If dirty flag is not set, this exception is wrapped intoUncheckedIOException
.
-
-