Class StaleReadException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.loomcache.common.exception.LoomException
com.loomcache.common.exception.StaleReadException
- All Implemented Interfaces:
Serializable
Thrown when a linearizable read cannot be served (lease expired).
This exception is raised when attempting a linearizable (strong consistency) read operation, but the read lease has expired. A read lease is held by the leader to guarantee linearizability: if a leader's lease expires, it can no longer serve linearizable reads until the lease is renewed.
Linearizable reads that fail with this exception may be retried, as the lease will be renewed on the next heartbeat. Alternatively, clients may fall back to eventual consistency reads or other strategies.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new StaleReadException with a default message.StaleReadException(String message) Creates a new StaleReadException with a custom message.StaleReadException(String message, Throwable cause) Creates a new StaleReadException with a message and cause. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StaleReadException
public StaleReadException()Creates a new StaleReadException with a default message. -
StaleReadException
Creates a new StaleReadException with a custom message.- Parameters:
message- the error message (must not be null)
-
StaleReadException
-