test_class.declarator: ctx = new HystrixRequestContextRule()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public HystrixRequestContextRule ctx = new HystrixRequestContextRule();
test_class.type: HystrixRequestContextRule
test_class.var_name: ctx
test_class.declarator: stream
test_class.original_string: HystrixConfigurationStream stream;
test_class.type: HystrixConfigurationStream
test_class.var_name: stream
test_class.declarator: groupKey = HystrixCommandGroupKey.Factory.asKey("Config")
test_class.modifier: private final static
test_class.original_string: private final static HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("Config");
test_class.type: HystrixCommandGroupKey
test_class.var_name: groupKey
test_class.declarator: commandKey = HystrixCommandKey.Factory.asKey("Command")
test_class.modifier: private final static
test_class.original_string: private final static HystrixCommandKey commandKey = HystrixCommandKey.Factory.asKey("Command");
test_class.type: HystrixCommandKey
test_class.var_name: commandKey
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/config/HystrixConfigurationStreamTest.java
test_class.identifier: HystrixConfigurationStreamTest
test_class.superclass: extends CommandStreamTest
test_case.body: @Test
      public void testTwoSubscribersOneSlowOneFast() throws Exception {
          final CountDownLatch latch = new CountDownLatch(1);
          final AtomicBoolean foundError = new AtomicBoolean(false);
  
          Observable<HystrixConfiguration> fast = stream
                  .observe()
                  .observeOn(Schedulers.newThread());
          Observable<HystrixConfiguration> slow = stream
                  .observe()
                  .observeOn(Schedulers.newThread())
                  .map(new Func1<HystrixConfiguration, HystrixConfiguration>() {
                      @Override
                      public HystrixConfiguration call(HystrixConfiguration config) {
                          try {
                              Thread.sleep(100);
                              return config;
                          } catch (InterruptedException ex) {
                              return config;
                          }
                      }
                  });
  
          Observable<Boolean> checkZippedEqual = Observable.zip(fast, slow, new Func2<HystrixConfiguration, HystrixConfiguration, Boolean>() {
              @Override
              public Boolean call(HystrixConfiguration payload, HystrixConfiguration payload2) {
                  return payload == payload2;
              }
          });
  
          Subscription s1 = checkZippedEqual
                  .take(10000)
                  .subscribe(new Subscriber<Boolean>() {
                      @Override
                      public void onCompleted() {
                          System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " : OnCompleted");
                          latch.countDown();
                      }
  
                      @Override
                      public void onError(Throwable e) {
                          System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " : OnError : " + e);
                          e.printStackTrace();
                          foundError.set(true);
                          latch.countDown();
                      }
  
                      @Override
                      public void onNext(Boolean b) {
                          //System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " : OnNext : " + b);
                      }
                  });
  
          for (int i = 0; i < 50; i++) {
              HystrixCommand<Integer> cmd = Command.from(groupKey, commandKey, HystrixEventType.SUCCESS, 50);
              cmd.execute();
          }
  
          latch.await(10000, TimeUnit.MILLISECONDS);
          assertFalse(foundError.get());
      }
test_case.class_method_signature: HystrixConfigurationStreamTest.testTwoSubscribersOneSlowOneFast()
test_case.full_signature: @Test public void testTwoSubscribersOneSlowOneFast()
test_case.identifier: testTwoSubscribersOneSlowOneFast
test_case.invocations: observeOn observe newThread map observeOn observe newThread sleep zip subscribe take println currentTimeMillis getName currentThread countDown println currentTimeMillis getName currentThread printStackTrace set countDown from execute await assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTwoSubscribersOneSlowOneFast()
focal_class.declarator: intervalInMilliseconds
focal_class.modifier: private final
focal_class.original_string: private final int intervalInMilliseconds;
focal_class.type: int
focal_class.var_name: intervalInMilliseconds
focal_class.declarator: allConfigurationStream
focal_class.modifier: private final
focal_class.original_string: private final Observable<HystrixConfiguration> allConfigurationStream;
focal_class.type: Observable<HystrixConfiguration>
focal_class.var_name: allConfigurationStream
focal_class.declarator: isSourceCurrentlySubscribed = new AtomicBoolean(false)
focal_class.modifier: private final
focal_class.original_string: private final AtomicBoolean isSourceCurrentlySubscribed = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: isSourceCurrentlySubscribed
focal_class.declarator: dataEmissionIntervalInMs =
              DynamicPropertyFactory.getInstance().getIntProperty("hystrix.stream.config.intervalInMilliseconds", 5000)
focal_class.modifier: private static final
focal_class.original_string: private static final DynamicIntProperty dataEmissionIntervalInMs =
              DynamicPropertyFactory.getInstance().getIntProperty("hystrix.stream.config.intervalInMilliseconds", 5000);
focal_class.type: DynamicIntProperty
focal_class.var_name: dataEmissionIntervalInMs
focal_class.declarator: getAllConfig =
              new Func1<Long, HystrixConfiguration>() {
                  @Override
                  public HystrixConfiguration call(Long timestamp) {
                      return HystrixConfiguration.from(
                              getAllCommandConfig.call(timestamp),
                              getAllThreadPoolConfig.call(timestamp),
                              getAllCollapserConfig.call(timestamp)
                      );
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<Long, HystrixConfiguration> getAllConfig =
              new Func1<Long, HystrixConfiguration>() {
                  @Override
                  public HystrixConfiguration call(Long timestamp) {
                      return HystrixConfiguration.from(
                              getAllCommandConfig.call(timestamp),
                              getAllThreadPoolConfig.call(timestamp),
                              getAllCollapserConfig.call(timestamp)
                      );
                  }
              };
focal_class.type: Func1<Long, HystrixConfiguration>
focal_class.var_name: getAllConfig
focal_class.declarator: INSTANCE =
              new HystrixConfigurationStream(dataEmissionIntervalInMs.get())
focal_class.modifier: private static final
focal_class.original_string: private static final HystrixConfigurationStream INSTANCE =
              new HystrixConfigurationStream(dataEmissionIntervalInMs.get());
focal_class.type: HystrixConfigurationStream
focal_class.var_name: INSTANCE
focal_class.declarator: getAllCommandConfig =
              new Func1<Long, Map<HystrixCommandKey, HystrixCommandConfiguration>>() {
                  @Override
                  public Map<HystrixCommandKey, HystrixCommandConfiguration> call(Long timestamp) {
                      Map<HystrixCommandKey, HystrixCommandConfiguration> commandConfigPerKey = new HashMap<HystrixCommandKey, HystrixCommandConfiguration>();
                      for (HystrixCommandMetrics commandMetrics: HystrixCommandMetrics.getInstances()) {
                          HystrixCommandKey commandKey = commandMetrics.getCommandKey();
                          HystrixThreadPoolKey threadPoolKey = commandMetrics.getThreadPoolKey();
                          HystrixCommandGroupKey groupKey = commandMetrics.getCommandGroup();
                          commandConfigPerKey.put(commandKey, sampleCommandConfiguration(commandKey, threadPoolKey, groupKey, commandMetrics.getProperties()));
                      }
                      return commandConfigPerKey;
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<Long, Map<HystrixCommandKey, HystrixCommandConfiguration>> getAllCommandConfig =
              new Func1<Long, Map<HystrixCommandKey, HystrixCommandConfiguration>>() {
                  @Override
                  public Map<HystrixCommandKey, HystrixCommandConfiguration> call(Long timestamp) {
                      Map<HystrixCommandKey, HystrixCommandConfiguration> commandConfigPerKey = new HashMap<HystrixCommandKey, HystrixCommandConfiguration>();
                      for (HystrixCommandMetrics commandMetrics: HystrixCommandMetrics.getInstances()) {
                          HystrixCommandKey commandKey = commandMetrics.getCommandKey();
                          HystrixThreadPoolKey threadPoolKey = commandMetrics.getThreadPoolKey();
                          HystrixCommandGroupKey groupKey = commandMetrics.getCommandGroup();
                          commandConfigPerKey.put(commandKey, sampleCommandConfiguration(commandKey, threadPoolKey, groupKey, commandMetrics.getProperties()));
                      }
                      return commandConfigPerKey;
                  }
              };
focal_class.type: Func1<Long, Map<HystrixCommandKey, HystrixCommandConfiguration>>
focal_class.var_name: getAllCommandConfig
focal_class.declarator: getAllThreadPoolConfig =
              new Func1<Long, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>() {
                  @Override
                  public Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> call(Long timestamp) {
                      Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> threadPoolConfigPerKey = new HashMap<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>();
                      for (HystrixThreadPoolMetrics threadPoolMetrics: HystrixThreadPoolMetrics.getInstances()) {
                          HystrixThreadPoolKey threadPoolKey = threadPoolMetrics.getThreadPoolKey();
                          threadPoolConfigPerKey.put(threadPoolKey, sampleThreadPoolConfiguration(threadPoolKey, threadPoolMetrics.getProperties()));
                      }
                      return threadPoolConfigPerKey;
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<Long, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>> getAllThreadPoolConfig =
              new Func1<Long, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>() {
                  @Override
                  public Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> call(Long timestamp) {
                      Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> threadPoolConfigPerKey = new HashMap<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>();
                      for (HystrixThreadPoolMetrics threadPoolMetrics: HystrixThreadPoolMetrics.getInstances()) {
                          HystrixThreadPoolKey threadPoolKey = threadPoolMetrics.getThreadPoolKey();
                          threadPoolConfigPerKey.put(threadPoolKey, sampleThreadPoolConfiguration(threadPoolKey, threadPoolMetrics.getProperties()));
                      }
                      return threadPoolConfigPerKey;
                  }
              };
focal_class.type: Func1<Long, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>
focal_class.var_name: getAllThreadPoolConfig
focal_class.declarator: getAllCollapserConfig =
              new Func1<Long, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>() {
                  @Override
                  public Map<HystrixCollapserKey, HystrixCollapserConfiguration> call(Long timestamp) {
                      Map<HystrixCollapserKey, HystrixCollapserConfiguration> collapserConfigPerKey = new HashMap<HystrixCollapserKey, HystrixCollapserConfiguration>();
                      for (HystrixCollapserMetrics collapserMetrics: HystrixCollapserMetrics.getInstances()) {
                          HystrixCollapserKey collapserKey = collapserMetrics.getCollapserKey();
                          collapserConfigPerKey.put(collapserKey, sampleCollapserConfiguration(collapserKey, collapserMetrics.getProperties()));
                      }
                      return collapserConfigPerKey;
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<Long, Map<HystrixCollapserKey, HystrixCollapserConfiguration>> getAllCollapserConfig =
              new Func1<Long, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>() {
                  @Override
                  public Map<HystrixCollapserKey, HystrixCollapserConfiguration> call(Long timestamp) {
                      Map<HystrixCollapserKey, HystrixCollapserConfiguration> collapserConfigPerKey = new HashMap<HystrixCollapserKey, HystrixCollapserConfiguration>();
                      for (HystrixCollapserMetrics collapserMetrics: HystrixCollapserMetrics.getInstances()) {
                          HystrixCollapserKey collapserKey = collapserMetrics.getCollapserKey();
                          collapserConfigPerKey.put(collapserKey, sampleCollapserConfiguration(collapserKey, collapserMetrics.getProperties()));
                      }
                      return collapserConfigPerKey;
                  }
              };
focal_class.type: Func1<Long, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>
focal_class.var_name: getAllCollapserConfig
focal_class.declarator: getOnlyCommandConfig =
              new Func1<HystrixConfiguration, Map<HystrixCommandKey, HystrixCommandConfiguration>>() {
                  @Override
                  public Map<HystrixCommandKey, HystrixCommandConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getCommandConfig();
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<HystrixConfiguration, Map<HystrixCommandKey, HystrixCommandConfiguration>> getOnlyCommandConfig =
              new Func1<HystrixConfiguration, Map<HystrixCommandKey, HystrixCommandConfiguration>>() {
                  @Override
                  public Map<HystrixCommandKey, HystrixCommandConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getCommandConfig();
                  }
              };
focal_class.type: Func1<HystrixConfiguration, Map<HystrixCommandKey, HystrixCommandConfiguration>>
focal_class.var_name: getOnlyCommandConfig
focal_class.declarator: getOnlyThreadPoolConfig =
              new Func1<HystrixConfiguration, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>() {
                  @Override
                  public Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getThreadPoolConfig();
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<HystrixConfiguration, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>> getOnlyThreadPoolConfig =
              new Func1<HystrixConfiguration, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>() {
                  @Override
                  public Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getThreadPoolConfig();
                  }
              };
focal_class.type: Func1<HystrixConfiguration, Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>
focal_class.var_name: getOnlyThreadPoolConfig
focal_class.declarator: getOnlyCollapserConfig =
              new Func1<HystrixConfiguration, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>() {
                  @Override
                  public Map<HystrixCollapserKey, HystrixCollapserConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getCollapserConfig();
                  }
              }
focal_class.modifier: private static final
focal_class.original_string: private static final Func1<HystrixConfiguration, Map<HystrixCollapserKey, HystrixCollapserConfiguration>> getOnlyCollapserConfig =
              new Func1<HystrixConfiguration, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>() {
                  @Override
                  public Map<HystrixCollapserKey, HystrixCollapserConfiguration> call(HystrixConfiguration hystrixConfiguration) {
                      return hystrixConfiguration.getCollapserConfig();
                  }
              };
focal_class.type: Func1<HystrixConfiguration, Map<HystrixCollapserKey, HystrixCollapserConfiguration>>
focal_class.var_name: getOnlyCollapserConfig
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/config/HystrixConfigurationStream.java
focal_class.identifier: HystrixConfigurationStream
focal_class.class_method_signature: HystrixConfigurationStream.HystrixConfigurationStream(final int intervalInMilliseconds)
focal_class.full_signature: @Deprecated //deprecated in 1.5.4. public  HystrixConfigurationStream(final int intervalInMilliseconds)
focal_class.identifier: HystrixConfigurationStream
focal_class.modifiers: @Deprecated //deprecated in 1.5.4. public
focal_class.parameters: (final int intervalInMilliseconds)
focal_class.signature:  HystrixConfigurationStream(final int intervalInMilliseconds)
focal_class.class_method_signature: HystrixConfigurationStream.getInstance()
focal_class.full_signature: public static HystrixConfigurationStream getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: HystrixConfigurationStream
focal_class.signature: HystrixConfigurationStream getInstance()
focal_class.class_method_signature: HystrixConfigurationStream.getNonSingletonInstanceOnlyUsedInUnitTests(int delayInMs)
focal_class.full_signature: static HystrixConfigurationStream getNonSingletonInstanceOnlyUsedInUnitTests(int delayInMs)
focal_class.identifier: getNonSingletonInstanceOnlyUsedInUnitTests
focal_class.modifiers: static
focal_class.parameters: (int delayInMs)
focal_class.return: HystrixConfigurationStream
focal_class.signature: HystrixConfigurationStream getNonSingletonInstanceOnlyUsedInUnitTests(int delayInMs)
focal_class.class_method_signature: HystrixConfigurationStream.observe()
focal_class.full_signature: public Observable<HystrixConfiguration> observe()
focal_class.identifier: observe
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<HystrixConfiguration>
focal_class.signature: Observable<HystrixConfiguration> observe()
focal_class.class_method_signature: HystrixConfigurationStream.observeCommandConfiguration()
focal_class.full_signature: public Observable<Map<HystrixCommandKey, HystrixCommandConfiguration>> observeCommandConfiguration()
focal_class.identifier: observeCommandConfiguration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<Map<HystrixCommandKey, HystrixCommandConfiguration>>
focal_class.signature: Observable<Map<HystrixCommandKey, HystrixCommandConfiguration>> observeCommandConfiguration()
focal_class.class_method_signature: HystrixConfigurationStream.observeThreadPoolConfiguration()
focal_class.full_signature: public Observable<Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>> observeThreadPoolConfiguration()
focal_class.identifier: observeThreadPoolConfiguration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>>
focal_class.signature: Observable<Map<HystrixThreadPoolKey, HystrixThreadPoolConfiguration>> observeThreadPoolConfiguration()
focal_class.class_method_signature: HystrixConfigurationStream.observeCollapserConfiguration()
focal_class.full_signature: public Observable<Map<HystrixCollapserKey, HystrixCollapserConfiguration>> observeCollapserConfiguration()
focal_class.identifier: observeCollapserConfiguration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<Map<HystrixCollapserKey, HystrixCollapserConfiguration>>
focal_class.signature: Observable<Map<HystrixCollapserKey, HystrixCollapserConfiguration>> observeCollapserConfiguration()
focal_class.class_method_signature: HystrixConfigurationStream.getIntervalInMilliseconds()
focal_class.full_signature: public int getIntervalInMilliseconds()
focal_class.identifier: getIntervalInMilliseconds
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getIntervalInMilliseconds()
focal_class.class_method_signature: HystrixConfigurationStream.isSourceCurrentlySubscribed()
focal_class.full_signature: public boolean isSourceCurrentlySubscribed()
focal_class.identifier: isSourceCurrentlySubscribed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSourceCurrentlySubscribed()
focal_class.class_method_signature: HystrixConfigurationStream.sampleCommandConfiguration(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                                                            HystrixCommandGroupKey groupKey, HystrixCommandProperties commandProperties)
focal_class.full_signature: private static HystrixCommandConfiguration sampleCommandConfiguration(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                                                            HystrixCommandGroupKey groupKey, HystrixCommandProperties commandProperties)
focal_class.identifier: sampleCommandConfiguration
focal_class.modifiers: private static
focal_class.parameters: (HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                                                            HystrixCommandGroupKey groupKey, HystrixCommandProperties commandProperties)
focal_class.return: HystrixCommandConfiguration
focal_class.signature: HystrixCommandConfiguration sampleCommandConfiguration(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                                                            HystrixCommandGroupKey groupKey, HystrixCommandProperties commandProperties)
focal_class.class_method_signature: HystrixConfigurationStream.sampleThreadPoolConfiguration(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties threadPoolProperties)
focal_class.full_signature: private static HystrixThreadPoolConfiguration sampleThreadPoolConfiguration(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties threadPoolProperties)
focal_class.identifier: sampleThreadPoolConfiguration
focal_class.modifiers: private static
focal_class.parameters: (HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties threadPoolProperties)
focal_class.return: HystrixThreadPoolConfiguration
focal_class.signature: HystrixThreadPoolConfiguration sampleThreadPoolConfiguration(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties threadPoolProperties)
focal_class.class_method_signature: HystrixConfigurationStream.sampleCollapserConfiguration(HystrixCollapserKey collapserKey, HystrixCollapserProperties collapserProperties)
focal_class.full_signature: private static HystrixCollapserConfiguration sampleCollapserConfiguration(HystrixCollapserKey collapserKey, HystrixCollapserProperties collapserProperties)
focal_class.identifier: sampleCollapserConfiguration
focal_class.modifiers: private static
focal_class.parameters: (HystrixCollapserKey collapserKey, HystrixCollapserProperties collapserProperties)
focal_class.return: HystrixCollapserConfiguration
focal_class.signature: HystrixCollapserConfiguration sampleCollapserConfiguration(HystrixCollapserKey collapserKey, HystrixCollapserProperties collapserProperties)
focal_method.body: public Observable<HystrixConfiguration> observe() {
          return allConfigurationStream;
      }
focal_method.class_method_signature: HystrixConfigurationStream.observe()
focal_method.full_signature: public Observable<HystrixConfiguration> observe()
focal_method.identifier: observe
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Observable<HystrixConfiguration>
focal_method.signature: Observable<HystrixConfiguration> observe()