test_class.declarator: context = new HystrixRequestContextRule()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public HystrixRequestContextRule context = new HystrixRequestContextRule();
test_class.type: HystrixRequestContextRule
test_class.var_name: context
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/HystrixCollapserTest.java
test_class.identifier: HystrixCollapserTest
test_case.body: @Test
      public void testShardedRequests() throws Exception {
          TestCollapserTimer timer = new TestCollapserTimer();
          HystrixCollapser<List<String>, String, String> collapser1 = new TestShardedRequestCollapser(timer, "1a");
          Future<String> response1 = collapser1.queue();
          Future<String> response2 = new TestShardedRequestCollapser(timer, "2b").queue();
          Future<String> response3 = new TestShardedRequestCollapser(timer, "3b").queue();
          Future<String> response4 = new TestShardedRequestCollapser(timer, "4a").queue();
          timer.incrementTime(10); // let time pass that equals the default delay/period
  
          assertEquals("1a", response1.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("2b", response2.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("3b", response3.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("4a", response4.get(1000, TimeUnit.MILLISECONDS));
  
          /* we should get 2 batches since it gets sharded */
          assertEquals(2, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size());
  
          Iterator<HystrixInvokableInfo<?>> cmdIterator = HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().iterator();
          assertEquals(2, cmdIterator.next().getNumberCollapsed());
          assertEquals(2, cmdIterator.next().getNumberCollapsed());
      }
test_case.class_method_signature: HystrixCollapserTest.testShardedRequests()
test_case.full_signature: @Test public void testShardedRequests()
test_case.identifier: testShardedRequests
test_case.invocations: queue queue queue queue incrementTime assertEquals get assertEquals get assertEquals get assertEquals get assertEquals size getAllExecutedCommands getCurrentRequest iterator getAllExecutedCommands getCurrentRequest assertEquals getNumberCollapsed next assertEquals getNumberCollapsed next
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShardedRequests()
focal_class.declarator: logger = LoggerFactory.getLogger(HystrixCollapser.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger logger = LoggerFactory.getLogger(HystrixCollapser.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: collapserFactory
focal_class.modifier: private final
focal_class.original_string: private final RequestCollapserFactory<BatchReturnType, ResponseType, RequestArgumentType> collapserFactory;
focal_class.type: RequestCollapserFactory<BatchReturnType, ResponseType, RequestArgumentType>
focal_class.var_name: collapserFactory
focal_class.declarator: requestCache
focal_class.modifier: private final
focal_class.original_string: private final HystrixRequestCache requestCache;
focal_class.type: HystrixRequestCache
focal_class.var_name: requestCache
focal_class.declarator: collapserInstanceWrapper
focal_class.modifier: private final
focal_class.original_string: private final HystrixCollapserBridge<BatchReturnType, ResponseType, RequestArgumentType> collapserInstanceWrapper;
focal_class.type: HystrixCollapserBridge<BatchReturnType, ResponseType, RequestArgumentType>
focal_class.var_name: collapserInstanceWrapper
focal_class.declarator: metrics
focal_class.modifier: private final
focal_class.original_string: private final HystrixCollapserMetrics metrics;
focal_class.type: HystrixCollapserMetrics
focal_class.var_name: metrics
focal_class.declarator: defaultNameCache = new ConcurrentHashMap<Class<? extends HystrixCollapser>, String>()
focal_class.modifier: @SuppressWarnings("rawtypes")
      private static
focal_class.original_string: @SuppressWarnings("rawtypes")
      private static ConcurrentHashMap<Class<? extends HystrixCollapser>, String> defaultNameCache = new ConcurrentHashMap<Class<? extends HystrixCollapser>, String>();
focal_class.type: ConcurrentHashMap<Class<? extends HystrixCollapser>, String>
focal_class.var_name: defaultNameCache
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/HystrixCollapser.java
focal_class.identifier: HystrixCollapser
focal_class.interfaces: implements HystrixExecutable<ResponseType>, HystrixObservable<ResponseType>
focal_class.class_method_signature: HystrixCollapser.HystrixCollapser()
focal_class.full_signature: protected  HystrixCollapser()
focal_class.identifier: HystrixCollapser
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  HystrixCollapser()
focal_class.class_method_signature: HystrixCollapser.HystrixCollapser(HystrixCollapserKey collapserKey)
focal_class.full_signature: protected  HystrixCollapser(HystrixCollapserKey collapserKey)
focal_class.identifier: HystrixCollapser
focal_class.modifiers: protected
focal_class.parameters: (HystrixCollapserKey collapserKey)
focal_class.signature:  HystrixCollapser(HystrixCollapserKey collapserKey)
focal_class.class_method_signature: HystrixCollapser.HystrixCollapser(Setter setter)
focal_class.full_signature: protected  HystrixCollapser(Setter setter)
focal_class.identifier: HystrixCollapser
focal_class.modifiers: protected
focal_class.parameters: (Setter setter)
focal_class.signature:  HystrixCollapser(Setter setter)
focal_class.class_method_signature: HystrixCollapser.HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder)
focal_class.full_signature:   HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder)
focal_class.identifier: HystrixCollapser
focal_class.parameters: (HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder)
focal_class.signature:  HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder)
focal_class.class_method_signature: HystrixCollapser.HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder, HystrixCollapserMetrics metrics)
focal_class.full_signature:   HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder, HystrixCollapserMetrics metrics)
focal_class.identifier: HystrixCollapser
focal_class.parameters: (HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder, HystrixCollapserMetrics metrics)
focal_class.signature:  HystrixCollapser(HystrixCollapserKey collapserKey, Scope scope, CollapserTimer timer, HystrixCollapserProperties.Setter propertiesBuilder, HystrixCollapserMetrics metrics)
focal_class.class_method_signature: HystrixCollapser.getProperties()
focal_class.full_signature: private HystrixCollapserProperties getProperties()
focal_class.identifier: getProperties
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: HystrixCollapserProperties
focal_class.signature: HystrixCollapserProperties getProperties()
focal_class.class_method_signature: HystrixCollapser.getCollapserKey()
focal_class.full_signature: public HystrixCollapserKey getCollapserKey()
focal_class.identifier: getCollapserKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: HystrixCollapserKey
focal_class.signature: HystrixCollapserKey getCollapserKey()
focal_class.class_method_signature: HystrixCollapser.getScope()
focal_class.full_signature: public Scope getScope()
focal_class.identifier: getScope
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Scope
focal_class.signature: Scope getScope()
focal_class.class_method_signature: HystrixCollapser.getMetrics()
focal_class.full_signature: public HystrixCollapserMetrics getMetrics()
focal_class.identifier: getMetrics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: HystrixCollapserMetrics
focal_class.signature: HystrixCollapserMetrics getMetrics()
focal_class.class_method_signature: HystrixCollapser.getRequestArgument()
focal_class.full_signature: public abstract RequestArgumentType getRequestArgument()
focal_class.identifier: getRequestArgument
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: RequestArgumentType
focal_class.signature: RequestArgumentType getRequestArgument()
focal_class.class_method_signature: HystrixCollapser.createCommand(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.full_signature: protected abstract HystrixCommand<BatchReturnType> createCommand(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.identifier: createCommand
focal_class.modifiers: protected abstract
focal_class.parameters: (Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.return: HystrixCommand<BatchReturnType>
focal_class.signature: HystrixCommand<BatchReturnType> createCommand(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.class_method_signature: HystrixCollapser.shardRequests(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.full_signature: protected Collection<Collection<CollapsedRequest<ResponseType, RequestArgumentType>>> shardRequests(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.identifier: shardRequests
focal_class.modifiers: protected
focal_class.parameters: (Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.return: Collection<Collection<CollapsedRequest<ResponseType, RequestArgumentType>>>
focal_class.signature: Collection<Collection<CollapsedRequest<ResponseType, RequestArgumentType>>> shardRequests(Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.class_method_signature: HystrixCollapser.mapResponseToRequests(BatchReturnType batchResponse, Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.full_signature: protected abstract void mapResponseToRequests(BatchReturnType batchResponse, Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.identifier: mapResponseToRequests
focal_class.modifiers: protected abstract
focal_class.parameters: (BatchReturnType batchResponse, Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.return: void
focal_class.signature: void mapResponseToRequests(BatchReturnType batchResponse, Collection<CollapsedRequest<ResponseType, RequestArgumentType>> requests)
focal_class.class_method_signature: HystrixCollapser.observe()
focal_class.full_signature: public Observable<ResponseType> observe()
focal_class.identifier: observe
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<ResponseType>
focal_class.signature: Observable<ResponseType> observe()
focal_class.class_method_signature: HystrixCollapser.toObservable()
focal_class.full_signature: public Observable<ResponseType> toObservable()
focal_class.identifier: toObservable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<ResponseType>
focal_class.signature: Observable<ResponseType> toObservable()
focal_class.class_method_signature: HystrixCollapser.toObservable(Scheduler observeOn)
focal_class.full_signature: public Observable<ResponseType> toObservable(Scheduler observeOn)
focal_class.identifier: toObservable
focal_class.modifiers: public
focal_class.parameters: (Scheduler observeOn)
focal_class.return: Observable<ResponseType>
focal_class.signature: Observable<ResponseType> toObservable(Scheduler observeOn)
focal_class.class_method_signature: HystrixCollapser.execute()
focal_class.full_signature: public ResponseType execute()
focal_class.identifier: execute
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ResponseType
focal_class.signature: ResponseType execute()
focal_class.class_method_signature: HystrixCollapser.queue()
focal_class.full_signature: public Future<ResponseType> queue()
focal_class.identifier: queue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Future<ResponseType>
focal_class.signature: Future<ResponseType> queue()
focal_class.class_method_signature: HystrixCollapser.getCacheKey()
focal_class.full_signature: protected String getCacheKey()
focal_class.identifier: getCacheKey
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCacheKey()
focal_class.class_method_signature: HystrixCollapser.reset()
focal_class.full_signature: static void reset()
focal_class.identifier: reset
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reset()
focal_class.class_method_signature: HystrixCollapser.getDefaultNameFromClass(@SuppressWarnings("rawtypes") Class<? extends HystrixCollapser> cls)
focal_class.full_signature: private static String getDefaultNameFromClass(@SuppressWarnings("rawtypes") Class<? extends HystrixCollapser> cls)
focal_class.identifier: getDefaultNameFromClass
focal_class.modifiers: private static
focal_class.parameters: (@SuppressWarnings("rawtypes") Class<? extends HystrixCollapser> cls)
focal_class.return: String
focal_class.signature: String getDefaultNameFromClass(@SuppressWarnings("rawtypes") Class<? extends HystrixCollapser> cls)
focal_method.body: public Future<ResponseType> queue() {
          return toObservable()
                  .toBlocking()
                  .toFuture();
      }
focal_method.class_method_signature: HystrixCollapser.queue()
focal_method.full_signature: public Future<ResponseType> queue()
focal_method.identifier: queue
focal_method.invocations: toFuture toBlocking toObservable
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Future<ResponseType>
focal_method.signature: Future<ResponseType> queue()