test_class.declarator: commandKey
test_class.original_string: HystrixCommandKey commandKey;
test_class.type: HystrixCommandKey
test_class.var_name: commandKey
test_class.declarator: threadPoolKey
test_class.original_string: HystrixThreadPoolKey threadPoolKey;
test_class.type: HystrixThreadPoolKey
test_class.var_name: threadPoolKey
test_class.declarator: writeToStream
test_class.original_string: HystrixThreadEventStream writeToStream;
test_class.type: HystrixThreadEventStream
test_class.var_name: writeToStream
test_class.declarator: readCommandStream
test_class.original_string: HystrixCommandCompletionStream readCommandStream;
test_class.type: HystrixCommandCompletionStream
test_class.var_name: readCommandStream
test_class.declarator: readThreadPoolStream
test_class.original_string: HystrixThreadPoolCompletionStream readThreadPoolStream;
test_class.type: HystrixThreadPoolCompletionStream
test_class.var_name: readThreadPoolStream
test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/metric/HystrixThreadEventStreamTest.java
test_class.identifier: HystrixThreadEventStreamTest
test_case.body: @Test
      public void testShortCircuit() throws Exception {
          CountDownLatch commandLatch = new CountDownLatch(1);
          CountDownLatch threadPoolLatch = new CountDownLatch(1);
  
          Subscriber<HystrixCommandCompletion> commandSubscriber = getLatchedSubscriber(commandLatch);
          readCommandStream.observe().take(1).subscribe(commandSubscriber);
  
          Subscriber<HystrixCommandCompletion> threadPoolSubscriber = getLatchedSubscriber(threadPoolLatch);
          readThreadPoolStream.observe().take(1).subscribe(threadPoolSubscriber);
  
          ExecutionResult result = ExecutionResult.from(HystrixEventType.SHORT_CIRCUITED);
          writeToStream.executionDone(result, commandKey, threadPoolKey);
  
          assertTrue(commandLatch.await(1000, TimeUnit.MILLISECONDS));
          assertFalse(threadPoolLatch.await(1000, TimeUnit.MILLISECONDS));
      }
test_case.class_method_signature: HystrixThreadEventStreamTest.testShortCircuit()
test_case.full_signature: @Test public void testShortCircuit()
test_case.identifier: testShortCircuit
test_case.invocations: getLatchedSubscriber subscribe take observe getLatchedSubscriber subscribe take observe from executionDone assertTrue await assertFalse await
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShortCircuit()
focal_class.declarator: threadId
focal_class.modifier: private final
focal_class.original_string: private final long threadId;
focal_class.type: long
focal_class.var_name: threadId
focal_class.declarator: threadName
focal_class.modifier: private final
focal_class.original_string: private final String threadName;
focal_class.type: String
focal_class.var_name: threadName
focal_class.declarator: writeOnlyCommandStartSubject
focal_class.modifier: private final
focal_class.original_string: private final Subject<HystrixCommandExecutionStarted, HystrixCommandExecutionStarted> writeOnlyCommandStartSubject;
focal_class.type: Subject<HystrixCommandExecutionStarted, HystrixCommandExecutionStarted>
focal_class.var_name: writeOnlyCommandStartSubject
focal_class.declarator: writeOnlyCommandCompletionSubject
focal_class.modifier: private final
focal_class.original_string: private final Subject<HystrixCommandCompletion, HystrixCommandCompletion> writeOnlyCommandCompletionSubject;
focal_class.type: Subject<HystrixCommandCompletion, HystrixCommandCompletion>
focal_class.var_name: writeOnlyCommandCompletionSubject
focal_class.declarator: writeOnlyCollapserSubject
focal_class.modifier: private final
focal_class.original_string: private final Subject<HystrixCollapserEvent, HystrixCollapserEvent> writeOnlyCollapserSubject;
focal_class.type: Subject<HystrixCollapserEvent, HystrixCollapserEvent>
focal_class.var_name: writeOnlyCollapserSubject
focal_class.declarator: threadLocalStreams = new ThreadLocal<HystrixThreadEventStream>() {
          @Override
          protected HystrixThreadEventStream initialValue() {
              return new HystrixThreadEventStream(Thread.currentThread());
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<HystrixThreadEventStream> threadLocalStreams = new ThreadLocal<HystrixThreadEventStream>() {
          @Override
          protected HystrixThreadEventStream initialValue() {
              return new HystrixThreadEventStream(Thread.currentThread());
          }
      };
focal_class.type: ThreadLocal<HystrixThreadEventStream>
focal_class.var_name: threadLocalStreams
focal_class.declarator: writeCommandStartsToShardedStreams = new Action1<HystrixCommandExecutionStarted>() {
          @Override
          public void call(HystrixCommandExecutionStarted event) {
              HystrixCommandStartStream commandStartStream = HystrixCommandStartStream.getInstance(event.getCommandKey());
              commandStartStream.write(event);
  
              if (event.isExecutedInThread()) {
                  HystrixThreadPoolStartStream threadPoolStartStream = HystrixThreadPoolStartStream.getInstance(event.getThreadPoolKey());
                  threadPoolStartStream.write(event);
              }
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Action1<HystrixCommandExecutionStarted> writeCommandStartsToShardedStreams = new Action1<HystrixCommandExecutionStarted>() {
          @Override
          public void call(HystrixCommandExecutionStarted event) {
              HystrixCommandStartStream commandStartStream = HystrixCommandStartStream.getInstance(event.getCommandKey());
              commandStartStream.write(event);
  
              if (event.isExecutedInThread()) {
                  HystrixThreadPoolStartStream threadPoolStartStream = HystrixThreadPoolStartStream.getInstance(event.getThreadPoolKey());
                  threadPoolStartStream.write(event);
              }
          }
      };
focal_class.type: Action1<HystrixCommandExecutionStarted>
focal_class.var_name: writeCommandStartsToShardedStreams
focal_class.declarator: writeCommandCompletionsToShardedStreams = new Action1<HystrixCommandCompletion>() {
          @Override
          public void call(HystrixCommandCompletion commandCompletion) {
              HystrixCommandCompletionStream commandStream = HystrixCommandCompletionStream.getInstance(commandCompletion.getCommandKey());
              commandStream.write(commandCompletion);
  
              if (commandCompletion.isExecutedInThread() || commandCompletion.isResponseThreadPoolRejected()) {
                  HystrixThreadPoolCompletionStream threadPoolStream = HystrixThreadPoolCompletionStream.getInstance(commandCompletion.getThreadPoolKey());
                  threadPoolStream.write(commandCompletion);
              }
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Action1<HystrixCommandCompletion> writeCommandCompletionsToShardedStreams = new Action1<HystrixCommandCompletion>() {
          @Override
          public void call(HystrixCommandCompletion commandCompletion) {
              HystrixCommandCompletionStream commandStream = HystrixCommandCompletionStream.getInstance(commandCompletion.getCommandKey());
              commandStream.write(commandCompletion);
  
              if (commandCompletion.isExecutedInThread() || commandCompletion.isResponseThreadPoolRejected()) {
                  HystrixThreadPoolCompletionStream threadPoolStream = HystrixThreadPoolCompletionStream.getInstance(commandCompletion.getThreadPoolKey());
                  threadPoolStream.write(commandCompletion);
              }
          }
      };
focal_class.type: Action1<HystrixCommandCompletion>
focal_class.var_name: writeCommandCompletionsToShardedStreams
focal_class.declarator: writeCollapserExecutionsToShardedStreams = new Action1<HystrixCollapserEvent>() {
          @Override
          public void call(HystrixCollapserEvent collapserEvent) {
              HystrixCollapserEventStream collapserStream = HystrixCollapserEventStream.getInstance(collapserEvent.getCollapserKey());
              collapserStream.write(collapserEvent);
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Action1<HystrixCollapserEvent> writeCollapserExecutionsToShardedStreams = new Action1<HystrixCollapserEvent>() {
          @Override
          public void call(HystrixCollapserEvent collapserEvent) {
              HystrixCollapserEventStream collapserStream = HystrixCollapserEventStream.getInstance(collapserEvent.getCollapserKey());
              collapserStream.write(collapserEvent);
          }
      };
focal_class.type: Action1<HystrixCollapserEvent>
focal_class.var_name: writeCollapserExecutionsToShardedStreams
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/metric/HystrixThreadEventStream.java
focal_class.identifier: HystrixThreadEventStream
focal_class.class_method_signature: HystrixThreadEventStream.HystrixThreadEventStream(Thread thread)
focal_class.full_signature:   HystrixThreadEventStream(Thread thread)
focal_class.identifier: HystrixThreadEventStream
focal_class.parameters: (Thread thread)
focal_class.signature:  HystrixThreadEventStream(Thread thread)
focal_class.class_method_signature: HystrixThreadEventStream.getInstance()
focal_class.full_signature: public static HystrixThreadEventStream getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: HystrixThreadEventStream
focal_class.signature: HystrixThreadEventStream getInstance()
focal_class.class_method_signature: HystrixThreadEventStream.shutdown()
focal_class.full_signature: public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: HystrixThreadEventStream.commandExecutionStarted(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                          HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy, int currentConcurrency)
focal_class.full_signature: public void commandExecutionStarted(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                          HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy, int currentConcurrency)
focal_class.identifier: commandExecutionStarted
focal_class.modifiers: public
focal_class.parameters: (HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                          HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy, int currentConcurrency)
focal_class.return: void
focal_class.signature: void commandExecutionStarted(HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey,
                                          HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy, int currentConcurrency)
focal_class.class_method_signature: HystrixThreadEventStream.executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_class.full_signature: public void executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_class.identifier: executionDone
focal_class.modifiers: public
focal_class.parameters: (ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_class.return: void
focal_class.signature: void executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_class.class_method_signature: HystrixThreadEventStream.collapserResponseFromCache(HystrixCollapserKey collapserKey)
focal_class.full_signature: public void collapserResponseFromCache(HystrixCollapserKey collapserKey)
focal_class.identifier: collapserResponseFromCache
focal_class.modifiers: public
focal_class.parameters: (HystrixCollapserKey collapserKey)
focal_class.return: void
focal_class.signature: void collapserResponseFromCache(HystrixCollapserKey collapserKey)
focal_class.class_method_signature: HystrixThreadEventStream.collapserBatchExecuted(HystrixCollapserKey collapserKey, int batchSize)
focal_class.full_signature: public void collapserBatchExecuted(HystrixCollapserKey collapserKey, int batchSize)
focal_class.identifier: collapserBatchExecuted
focal_class.modifiers: public
focal_class.parameters: (HystrixCollapserKey collapserKey, int batchSize)
focal_class.return: void
focal_class.signature: void collapserBatchExecuted(HystrixCollapserKey collapserKey, int batchSize)
focal_class.class_method_signature: HystrixThreadEventStream.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public void executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey) {
          HystrixCommandCompletion event = HystrixCommandCompletion.from(executionResult, commandKey, threadPoolKey);
          writeOnlyCommandCompletionSubject.onNext(event);
      }
focal_method.class_method_signature: HystrixThreadEventStream.executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_method.full_signature: public void executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_method.identifier: executionDone
focal_method.invocations: from onNext
focal_method.modifiers: public
focal_method.parameters: (ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)
focal_method.return: void
focal_method.signature: void executionDone(ExecutionResult executionResult, HystrixCommandKey commandKey, HystrixThreadPoolKey threadPoolKey)