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 testRequestsOverTime() throws Exception {
          TestCollapserTimer timer = new TestCollapserTimer();
          HystrixCollapser<List<String>, String, String> collapser1 = new TestRequestCollapser(timer, 1);
          Future<String> response1 = collapser1.queue();
          timer.incrementTime(5);
          Future<String> response2 = new TestRequestCollapser(timer, 2).queue();
          timer.incrementTime(8);
          // should execute here
          Future<String> response3 = new TestRequestCollapser(timer, 3).queue();
          timer.incrementTime(6);
          Future<String> response4 = new TestRequestCollapser(timer, 4).queue();
          timer.incrementTime(8);
          // should execute here
          Future<String> response5 = new TestRequestCollapser(timer, 5).queue();
          timer.incrementTime(10);
          // should execute here
  
          // wait for all tasks to complete
          assertEquals("1", response1.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("2", response2.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("3", response3.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("4", response4.get(1000, TimeUnit.MILLISECONDS));
          assertEquals("5", response5.get(1000, TimeUnit.MILLISECONDS));
  
          assertEquals(3, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size());
  
          Iterator<HystrixInvokableInfo<?>> cmdIterator = HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().iterator();
          assertEquals(2, cmdIterator.next().getNumberCollapsed());
          assertEquals(2, cmdIterator.next().getNumberCollapsed());
          assertEquals(1, cmdIterator.next().getNumberCollapsed());
      }
test_case.class_method_signature: HystrixCollapserTest.testRequestsOverTime()
test_case.full_signature: @Test public void testRequestsOverTime()
test_case.identifier: testRequestsOverTime
test_case.invocations: queue incrementTime queue incrementTime queue incrementTime queue incrementTime queue incrementTime assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals size getAllExecutedCommands getCurrentRequest iterator getAllExecutedCommands getCurrentRequest assertEquals getNumberCollapsed next assertEquals getNumberCollapsed next assertEquals getNumberCollapsed next
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRequestsOverTime()
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()