Package org.springframework.data.redis
Class ClusterRedirectException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.DataRetrievalFailureException
org.springframework.data.redis.ClusterRedirectException
- All Implemented Interfaces:
Serializable
ClusterRedirectException
indicates that a requested slot is not served by the targeted server but can be
obtained on another one.- Since:
- 1.7
- Author:
- Christoph Strobl, Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionClusterRedirectException
(int slot, String targetHost, int targetPort, Throwable e) Creates newClusterRedirectException
. -
Method Summary
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ClusterRedirectException
Creates newClusterRedirectException
.- Parameters:
slot
- the slot to redirect to.targetHost
- the host to redirect to.targetPort
- the port on the host.e
- the root cause from the data access API in use.
-
-
Method Details
-
getSlot
public int getSlot()- Returns:
- the slot to go for.
-
getTargetHost
- Returns:
- host serving the slot.
-
getTargetPort
public int getTargetPort()- Returns:
- port on host serving the slot.
-