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:
Serializable
This exception is thrown when there is a problem of writing state to disk.
- See Also:
- Serialized Form
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isDirty()
If this method returns false, state is guaranteed to be not written to disk.void
Rethrows thisWriteStateException
asIOError
if 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 thisWriteStateException
asIOError
if dirty flag is set, which will lead to JVM shutdown. If dirty flag is not set, this exception is wrapped intoUncheckedIOException
.
-