java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.elasticsearch.gateway.WriteStateException
- All Implemented Interfaces:
Serializable
This exception is thrown when there is a problem of writing state to disk.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisDirty()If this method returns false, state is guaranteed to be not written to disk.voidRethrows thisWriteStateExceptionasIOErrorif dirty flag is set, which will lead to JVM shutdown.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
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 thisWriteStateExceptionasIOErrorif dirty flag is set, which will lead to JVM shutdown. If dirty flag is not set, this exception is wrapped intoUncheckedIOException.
-