test_class.file: hystrix-core/src/test/java/com/netflix/hystrix/collapser/CollapsedRequestSubjectTest.java
test_class.identifier: CollapsedRequestSubjectTest
test_case.body: @Test
      public void testSetException() throws InterruptedException, ExecutionException {
          CollapsedRequestSubject<String, String> cr = new CollapsedRequestSubject<String, String>("hello");
          Observable<String> o = cr.toObservable();
          Future<String> v = o.toBlocking().toFuture();
  
          cr.setException(new RuntimeException("anException"));
  
          // fetch value
          try {
              v.get();
              fail("expected exception");
          } catch (ExecutionException e) {
              assertEquals("anException", e.getCause().getMessage());
          }
      }
test_case.class_method_signature: CollapsedRequestSubjectTest.testSetException()
test_case.full_signature: @Test public void testSetException()
test_case.identifier: testSetException
test_case.invocations: toObservable toFuture toBlocking setException get fail assertEquals getMessage getCause
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetException()
focal_class.declarator: argument
focal_class.modifier: private final
focal_class.original_string: private final R argument;
focal_class.type: R
focal_class.var_name: argument
focal_class.declarator: valueSet = new AtomicBoolean(false)
focal_class.modifier: private
focal_class.original_string: private AtomicBoolean valueSet = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: valueSet
focal_class.declarator: subject = ReplaySubject.create()
focal_class.modifier: private final
focal_class.original_string: private final ReplaySubject<T> subject = ReplaySubject.create();
focal_class.type: ReplaySubject<T>
focal_class.var_name: subject
focal_class.declarator: subjectWithAccounting
focal_class.modifier: private final
focal_class.original_string: private final Observable<T> subjectWithAccounting;
focal_class.type: Observable<T>
focal_class.var_name: subjectWithAccounting
focal_class.declarator: outstandingSubscriptions = 0
focal_class.modifier: private volatile
focal_class.original_string: private volatile int outstandingSubscriptions = 0;
focal_class.type: int
focal_class.var_name: outstandingSubscriptions
focal_class.file: hystrix-core/src/main/java/com/netflix/hystrix/collapser/CollapsedRequestSubject.java
focal_class.identifier: CollapsedRequestSubject
focal_class.interfaces: implements CollapsedRequest<T, R>
focal_class.class_method_signature: CollapsedRequestSubject.CollapsedRequestSubject(final R arg, final RequestBatch<?, T, R> containingBatch)
focal_class.full_signature: public  CollapsedRequestSubject(final R arg, final RequestBatch<?, T, R> containingBatch)
focal_class.identifier: CollapsedRequestSubject
focal_class.modifiers: public
focal_class.parameters: (final R arg, final RequestBatch<?, T, R> containingBatch)
focal_class.signature:  CollapsedRequestSubject(final R arg, final RequestBatch<?, T, R> containingBatch)
focal_class.class_method_signature: CollapsedRequestSubject.CollapsedRequestSubject(final R arg)
focal_class.full_signature: public  CollapsedRequestSubject(final R arg)
focal_class.identifier: CollapsedRequestSubject
focal_class.modifiers: public
focal_class.parameters: (final R arg)
focal_class.signature:  CollapsedRequestSubject(final R arg)
focal_class.class_method_signature: CollapsedRequestSubject.getArgument()
focal_class.full_signature: @Override public R getArgument()
focal_class.identifier: getArgument
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: R
focal_class.signature: R getArgument()
focal_class.class_method_signature: CollapsedRequestSubject.setResponse(T response)
focal_class.full_signature: @Override public void setResponse(T response)
focal_class.identifier: setResponse
focal_class.modifiers: @Override public
focal_class.parameters: (T response)
focal_class.return: void
focal_class.signature: void setResponse(T response)
focal_class.class_method_signature: CollapsedRequestSubject.emitResponse(T response)
focal_class.full_signature: @Override public void emitResponse(T response)
focal_class.identifier: emitResponse
focal_class.modifiers: @Override public
focal_class.parameters: (T response)
focal_class.return: void
focal_class.signature: void emitResponse(T response)
focal_class.class_method_signature: CollapsedRequestSubject.setComplete()
focal_class.full_signature: @Override public void setComplete()
focal_class.identifier: setComplete
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setComplete()
focal_class.class_method_signature: CollapsedRequestSubject.setExceptionIfResponseNotReceived(Exception e)
focal_class.full_signature: public void setExceptionIfResponseNotReceived(Exception e)
focal_class.identifier: setExceptionIfResponseNotReceived
focal_class.modifiers: public
focal_class.parameters: (Exception e)
focal_class.return: void
focal_class.signature: void setExceptionIfResponseNotReceived(Exception e)
focal_class.class_method_signature: CollapsedRequestSubject.setExceptionIfResponseNotReceived(Exception e, String exceptionMessage)
focal_class.full_signature: public Exception setExceptionIfResponseNotReceived(Exception e, String exceptionMessage)
focal_class.identifier: setExceptionIfResponseNotReceived
focal_class.modifiers: public
focal_class.parameters: (Exception e, String exceptionMessage)
focal_class.return: Exception
focal_class.signature: Exception setExceptionIfResponseNotReceived(Exception e, String exceptionMessage)
focal_class.class_method_signature: CollapsedRequestSubject.setException(Exception e)
focal_class.full_signature: @Override public void setException(Exception e)
focal_class.identifier: setException
focal_class.modifiers: @Override public
focal_class.parameters: (Exception e)
focal_class.return: void
focal_class.signature: void setException(Exception e)
focal_class.class_method_signature: CollapsedRequestSubject.isTerminated()
focal_class.full_signature: private boolean isTerminated()
focal_class.identifier: isTerminated
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTerminated()
focal_class.class_method_signature: CollapsedRequestSubject.toObservable()
focal_class.full_signature: public Observable<T> toObservable()
focal_class.identifier: toObservable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Observable<T>
focal_class.signature: Observable<T> toObservable()
focal_method.body: @Override
      public void setException(Exception e) {
          if (!isTerminated()) {
              subject.onError(e);
          } else {
              throw new IllegalStateException("Response has already terminated so exception can not be set", e);
          }
      }
focal_method.class_method_signature: CollapsedRequestSubject.setException(Exception e)
focal_method.full_signature: @Override public void setException(Exception e)
focal_method.identifier: setException
focal_method.invocations: isTerminated onError
focal_method.modifiers: @Override public
focal_method.parameters: (Exception e)
focal_method.return: void
focal_method.signature: void setException(Exception e)