Hystrix: Latency and Fault Tolerance for Distributed Systems



com.netflix.hystrix.collapser
Class RequestCollapserFactory<BatchReturnType,ResponseType,RequestArgumentType>

java.lang.Object
  extended by com.netflix.hystrix.collapser.RequestCollapserFactory<BatchReturnType,ResponseType,RequestArgumentType>
Type Parameters:
BatchReturnType -
ResponseType -
RequestArgumentType -

public class RequestCollapserFactory<BatchReturnType,ResponseType,RequestArgumentType>
extends java.lang.Object

Factory for retrieving the correct instance of a RequestCollapser.


Nested Class Summary
static class RequestCollapserFactory.Setter
          Fluent interface for arguments to the HystrixCollapser constructor.
 
Constructor Summary
RequestCollapserFactory(HystrixCollapserKey collapserKey, HystrixCollapser.Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder)
           
 
Method Summary
 HystrixCollapserKey getCollapserKey()
           
 HystrixCollapserProperties getProperties()
           
 RequestCollapser<BatchReturnType,ResponseType,RequestArgumentType> getRequestCollapser(HystrixCollapserBridge<BatchReturnType,ResponseType,RequestArgumentType> commandCollapser)
           
static HystrixRequestVariableHolder<RequestCollapser<?,?,?>> getRequestVariable(java.lang.String key)
          Used for testing
 HystrixCollapser.Scope getScope()
           
static void reset()
          Clears all state.
static void resetRequest()
          Used for testing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestCollapserFactory

public RequestCollapserFactory(HystrixCollapserKey collapserKey,
                               HystrixCollapser.Scope scope,
                               CollapserTimer timer,
                               HystrixCollapserProperties.Setter propertiesBuilder)
Method Detail

getCollapserKey

public HystrixCollapserKey getCollapserKey()

getScope

public HystrixCollapser.Scope getScope()

getProperties

public HystrixCollapserProperties getProperties()

getRequestCollapser

public RequestCollapser<BatchReturnType,ResponseType,RequestArgumentType> getRequestCollapser(HystrixCollapserBridge<BatchReturnType,ResponseType,RequestArgumentType> commandCollapser)

reset

public static void reset()
Clears all state. If new requests come in instances will be recreated and metrics started from scratch.


resetRequest

public static void resetRequest()
Used for testing


getRequestVariable

public static HystrixRequestVariableHolder<RequestCollapser<?,?,?>> getRequestVariable(java.lang.String key)
Used for testing