public class LoadBalancedRetryContext
extends org.springframework.retry.context.RetryContextSupport
RetryContext
for load-balanced retries.Constructor and Description |
---|
LoadBalancedRetryContext(org.springframework.retry.RetryContext parent,
org.springframework.http.HttpRequest request)
Creates a new load-balanced context.
|
Modifier and Type | Method and Description |
---|---|
ServiceInstance |
getPreviousServiceInstance() |
org.springframework.http.HttpRequest |
getRequest()
Gets the request that is being load-balanced.
|
ServiceInstance |
getServiceInstance()
Gets the service instance used during the retry.
|
void |
setPreviousServiceInstance(ServiceInstance previousServiceInstance) |
void |
setRequest(org.springframework.http.HttpRequest request)
Sets the request that is being load-balanced.
|
void |
setServiceInstance(ServiceInstance serviceInstance)
Sets the service instance to use during the retry.
|
getLastThrowable, getParent, getRetryCount, isExhaustedOnly, registerThrowable, setExhaustedOnly, toString
attributeNames, copyAttributesFrom, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttribute
public LoadBalancedRetryContext(org.springframework.retry.RetryContext parent, org.springframework.http.HttpRequest request)
parent
- The parent context.request
- The request that is being load-balanced.public org.springframework.http.HttpRequest getRequest()
public void setRequest(org.springframework.http.HttpRequest request)
request
- The request to be load balanced.public ServiceInstance getServiceInstance()
public void setServiceInstance(ServiceInstance serviceInstance)
serviceInstance
- The service instance to use during the retry.public ServiceInstance getPreviousServiceInstance()
public void setPreviousServiceInstance(ServiceInstance previousServiceInstance)
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.