public class OutdatedTopologyException extends CacheException
Most of the time, read commands can be retried in the same topology, so they use a delta of 0,
see RETRY_SAME_TOPOLOGY
.
Write commands cannot be retried in the same topology, so they always use a delta of 1 (or more).
This exception can be thrown very often when node is joining or leaving, so it has not stack trace information, and using the constants is preferred.
Modifier and Type | Field and Description |
---|---|
static OutdatedTopologyException |
RETRY_NEXT_TOPOLOGY
A cached instance that requests the command's topology id + 1.
|
static OutdatedTopologyException |
RETRY_SAME_TOPOLOGY
A cached instance, used for read commands that need to be retried in the same topology.
|
int |
topologyIdDelta |
Constructor and Description |
---|
OutdatedTopologyException(int topologyIdDelta)
Deprecated.
Since 10.0, the explicit topology is ignored and the delta is set to 1
|
OutdatedTopologyException(String msg)
Deprecated.
Since 10.0, please use the constants
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public final int topologyIdDelta
public static final OutdatedTopologyException RETRY_NEXT_TOPOLOGY
public static final OutdatedTopologyException RETRY_SAME_TOPOLOGY
This happens because we read from backup owners when the primary owners no longer have the entry, so we only retry when all of the owners reply with an UnsureResponse. Topologies T and T+1 always have at least one read owner in common, so receiving UnsureResponse from all the owners means either one owner had topology T+2 and by now we have at least T+1, or one owner had topology T-1 and another had T+1, and by now all should have at least T.
@Deprecated public OutdatedTopologyException(String msg)
@Deprecated public OutdatedTopologyException(int topologyIdDelta)
Copyright © 2021 JBoss by Red Hat. All rights reserved.