Class StaleReadException

All Implemented Interfaces:
Serializable

public final class StaleReadException extends LoomException
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 Details

    • StaleReadException

      public StaleReadException()
      Creates a new StaleReadException with a default message.
    • StaleReadException

      public StaleReadException(String message)
      Creates a new StaleReadException with a custom message.
      Parameters:
      message - the error message (must not be null)
    • StaleReadException

      public StaleReadException(String message, Throwable cause)
      Creates a new StaleReadException with a message and cause.
      Parameters:
      message - the error message (must not be null)
      cause - the underlying cause