/** When a {@link HystrixObservableCommand} emits a value during fallback */
 /* package */ void markFallbackEmit() {
   eventNotifier.markEvent(HystrixEventType.FALLBACK_EMIT, getCommandKey());
   counter.increment(HystrixRollingNumberEvent.FALLBACK_EMIT);
 }
 /**
  * When a command is fronted by an {@link HystrixCollapser} then this marks how many requests are
  * collapsed into the single command execution.
  *
  * @param numRequestsCollapsedToBatch number of requests which got batched
  */
 /* package */ void markCollapsed(int numRequestsCollapsedToBatch) {
   eventNotifier.markEvent(HystrixEventType.COLLAPSED, key);
   counter.add(HystrixRollingNumberEvent.COLLAPSED, numRequestsCollapsedToBatch);
 }
 /**
  * When a response is coming from a cache.
  *
  * <p>The cache-hit ratio can be determined by dividing this number by the total calls.
  */
 /* package */ void markResponseFromCache() {
   eventNotifier.markEvent(HystrixEventType.RESPONSE_FROM_CACHE, key);
   counter.increment(HystrixRollingNumberEvent.RESPONSE_FROM_CACHE);
 }
 /**
  * When a {@link HystrixCommand} attempts to retrieve a fallback but it is rejected due to too
  * many concurrent executing fallback requests.
  */
 /* package */ void markFallbackRejection() {
   eventNotifier.markEvent(HystrixEventType.FALLBACK_REJECTION, key);
   counter.increment(HystrixRollingNumberEvent.FALLBACK_REJECTION);
 }
 /**
  * When a {@link HystrixCommand} throws an exception (this will occur every time {@link
  * #markFallbackFailure} occurs, whenever {@link #markFailure} occurs without a fallback
  * implemented, or whenever a {@link #markBadRequest(long)} occurs)
  */
 /* package */ void markExceptionThrown() {
   eventNotifier.markEvent(HystrixEventType.EXCEPTION_THROWN, key);
   counter.increment(HystrixRollingNumberEvent.EXCEPTION_THROWN);
 }
 /** When a {@link HystrixCommand} returns a Fallback successfully. */
 /* package */ void markFallbackSuccess() {
   eventNotifier.markEvent(HystrixEventType.FALLBACK_SUCCESS, key);
   counter.increment(HystrixRollingNumberEvent.FALLBACK_SUCCESS);
 }
 /** When a {@link HystrixCommand} attempts to retrieve a fallback but fails. */
 /* package */ void markFallbackFailure() {
   eventNotifier.markEvent(HystrixEventType.FALLBACK_FAILURE, key);
   counter.increment(HystrixRollingNumberEvent.FALLBACK_FAILURE);
 }
 /**
  * When a {@link HystrixCommand} is unable to execute due to reaching the semaphore limit it will
  * call this method to report its occurrence.
  */
 /* package */ void markSemaphoreRejection() {
   eventNotifier.markEvent(HystrixEventType.SEMAPHORE_REJECTED, key);
   counter.increment(HystrixRollingNumberEvent.SEMAPHORE_REJECTED);
 }
 /**
  * When a {@link HystrixCommand} is executed and triggers a {@link HystrixBadRequestException}
  * during its execution
  */
 /* package */ void markBadRequest(long duration) {
   eventNotifier.markEvent(HystrixEventType.BAD_REQUEST, key);
   counter.increment(HystrixRollingNumberEvent.BAD_REQUEST);
 }
Ejemplo n.º 10
0
 /**
  * When a {@link HystrixCommand} is unable to queue up (threadpool rejection) it will call this
  * method to report its occurrence.
  */
 /* package */ void markThreadPoolRejection() {
   eventNotifier.markEvent(HystrixEventType.THREAD_POOL_REJECTED, key);
   counter.increment(HystrixRollingNumberEvent.THREAD_POOL_REJECTED);
 }
Ejemplo n.º 11
0
 /**
  * When a {@link HystrixCommand} performs a short-circuited fallback it will call this method to
  * report its occurrence.
  */
 /* package */ void markShortCircuited() {
   eventNotifier.markEvent(HystrixEventType.SHORT_CIRCUITED, key);
   counter.increment(HystrixRollingNumberEvent.SHORT_CIRCUITED);
 }
Ejemplo n.º 12
0
 /**
  * When a {@link HystrixCommand} times out (fails to complete) it will call this method to report
  * its failure along with how long the command waited (this time should equal or be very close to
  * the timeout value).
  *
  * @param duration command duration
  */
 /* package */ void markTimeout(long duration) {
   eventNotifier.markEvent(HystrixEventType.TIMEOUT, key);
   counter.increment(HystrixRollingNumberEvent.TIMEOUT);
 }
Ejemplo n.º 13
0
 /**
  * When a {@link HystrixCommand} fails to complete it will call this method to report its failure
  * along with how long the execution took.
  *
  * @param duration command duration
  */
 /* package */ void markFailure(long duration) {
   eventNotifier.markEvent(HystrixEventType.FAILURE, key);
   counter.increment(HystrixRollingNumberEvent.FAILURE);
 }
Ejemplo n.º 14
0
 /**
  * When a {@link HystrixCommand} successfully completes it will call this method to report its
  * success along with how long the execution took.
  *
  * @param duration command duration
  */
 /* package */ void markSuccess(long duration) {
   eventNotifier.markEvent(HystrixEventType.SUCCESS, key);
   counter.increment(HystrixRollingNumberEvent.SUCCESS);
 }