Hystrix: Latency and Fault Tolerance for Distributed Systems



com.netflix.hystrix
Interface HystrixCollapser.CollapsedRequest<ResponseType,RequestArgumentType>

Enclosing class:
HystrixCollapser<BatchReturnType,ResponseType,RequestArgumentType>

public static interface HystrixCollapser.CollapsedRequest<ResponseType,RequestArgumentType>

A request argument RequestArgumentType that was collapsed for batch processing and needs a response ResponseType set on it by the executeBatch implementation.


Method Summary
 RequestArgumentType getArgument()
          The request argument passed into the HystrixCollapser instance constructor which was then collapsed.
 void setException(java.lang.Exception exception)
          When set any client thread blocking on get() will immediately be unblocked and receive the exception.
 void setResponse(ResponseType response)
          When set any client thread blocking on get() will immediately be unblocked and receive the response.
 

Method Detail

getArgument

RequestArgumentType getArgument()
The request argument passed into the HystrixCollapser instance constructor which was then collapsed.

Returns:
RequestArgumentType

setResponse

void setResponse(ResponseType response)
When set any client thread blocking on get() will immediately be unblocked and receive the response.

Parameters:
response - ResponseType
Throws:
java.lang.IllegalStateException - if called more than once or after setException.

setException

void setException(java.lang.Exception exception)
When set any client thread blocking on get() will immediately be unblocked and receive the exception.

Parameters:
exception -
Throws:
java.lang.IllegalStateException - if called more than once or after setResponse.