Class CommandFollowUser

java.lang.Object
com.netflix.hystrix.HystrixCommand<T>
com.github.twitch4j.graphql.command.BaseCommand<com.github.twitch4j.graphql.internal.FollowMutation.Data>
com.github.twitch4j.graphql.command.CommandFollowUser
All Implemented Interfaces:
com.netflix.hystrix.HystrixExecutable<com.github.twitch4j.graphql.internal.FollowMutation.Data>, com.netflix.hystrix.HystrixInvokable<com.github.twitch4j.graphql.internal.FollowMutation.Data>, com.netflix.hystrix.HystrixInvokableInfo<com.github.twitch4j.graphql.internal.FollowMutation.Data>, com.netflix.hystrix.HystrixObservable<com.github.twitch4j.graphql.internal.FollowMutation.Data>

public class CommandFollowUser
extends BaseCommand<com.github.twitch4j.graphql.internal.FollowMutation.Data>
Follow User
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.netflix.hystrix.HystrixCommand

    com.netflix.hystrix.HystrixCommand.Setter
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected com.netflix.hystrix.HystrixCircuitBreaker circuitBreaker  
    protected static java.util.concurrent.ConcurrentHashMap<com.netflix.hystrix.HystrixCommandKey,​java.lang.Boolean> commandContainsFallback  
    protected com.netflix.hystrix.HystrixCommandGroupKey commandGroup  
    protected com.netflix.hystrix.HystrixCommandKey commandKey  
    protected long commandStartTimestamp  
    protected java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.CommandState> commandState  
    protected com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy concurrencyStrategy  
    protected com.netflix.hystrix.HystrixRequestLog currentRequestLog  
    protected rx.functions.Action0 endCurrentThreadExecutingCommand  
    protected com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier eventNotifier  
    protected com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook executionHook  
    protected com.netflix.hystrix.ExecutionResult executionResult  
    protected com.netflix.hystrix.ExecutionResult executionResultAtTimeOfCancellation  
    protected com.netflix.hystrix.AbstractCommand.TryableSemaphore executionSemaphoreOverride  
    protected static java.util.concurrent.ConcurrentHashMap<java.lang.String,​com.netflix.hystrix.AbstractCommand.TryableSemaphore> executionSemaphorePerCircuit  
    protected com.netflix.hystrix.AbstractCommand.TryableSemaphore fallbackSemaphoreOverride  
    protected static java.util.concurrent.ConcurrentHashMap<java.lang.String,​com.netflix.hystrix.AbstractCommand.TryableSemaphore> fallbackSemaphorePerCircuit  
    protected java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.TimedOutStatus> isCommandTimedOut  
    protected boolean isResponseFromCache  
    protected com.netflix.hystrix.HystrixCommandMetrics metrics  
    protected com.netflix.hystrix.HystrixCommandProperties properties  
    protected com.netflix.hystrix.HystrixRequestCache requestCache  
    protected com.netflix.hystrix.HystrixThreadPool threadPool  
    protected com.netflix.hystrix.HystrixThreadPoolKey threadPoolKey  
    protected java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.ThreadState> threadState  
    protected java.util.concurrent.atomic.AtomicReference<java.lang.ref.Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> timeoutTimer  

    Fields inherited from class com.github.twitch4j.graphql.command.BaseCommand

    apolloClient
  • Constructor Summary

    Constructors
    Constructor Description
    CommandFollowUser​(com.apollographql.apollo.ApolloClient apolloClient, java.lang.Long targetUserId, java.lang.Boolean goLiveNotification)  
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.Throwable decomposeException​(java.lang.Exception arg0)  
    protected java.lang.String getCacheKey()  
    com.netflix.hystrix.HystrixCommandGroupKey getCommandGroup()  
    com.netflix.hystrix.HystrixCommandKey getCommandKey()  
    long getCommandRunStartTimeInNanos()  
    com.netflix.hystrix.ExecutionResult.EventCounts getEventCounts()  
    protected java.lang.Exception getExceptionFromThrowable​(java.lang.Throwable arg0)  
    java.util.List<com.netflix.hystrix.HystrixEventType> getExecutionEvents()  
    java.lang.Throwable getExecutionException()  
    protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getExecutionSemaphore()  
    int getExecutionTimeInMilliseconds()  
    java.lang.Throwable getFailedExecutionException()  
    protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getFallbackSemaphore()  
    protected com.apollographql.apollo.ApolloCall<com.github.twitch4j.graphql.internal.FollowMutation.Data> getGraphQLCall()
    Abstract GraphQL Call
    protected java.lang.String getLogMessagePrefix()  
    com.netflix.hystrix.HystrixCommandMetrics getMetrics()  
    int getNumberCollapsed()  
    int getNumberEmissions()  
    int getNumberFallbackEmissions()  
    com.netflix.hystrix.HystrixCollapserKey getOriginatingCollapserKey()  
    com.netflix.hystrix.HystrixCommandProperties getProperties()  
    java.lang.String getPublicCacheKey()  
    com.netflix.hystrix.HystrixThreadPoolKey getThreadPoolKey()  
    protected void handleThreadEnd​(com.netflix.hystrix.AbstractCommand<com.github.twitch4j.graphql.internal.FollowMutation.Data> arg0)  
    boolean isCircuitBreakerOpen()  
    boolean isExecutedInThread()  
    boolean isExecutionComplete()  
    boolean isFailedExecution()  
    protected boolean isRequestCachingEnabled()  
    boolean isResponseFromCache()  
    boolean isResponseFromFallback()  
    boolean isResponseRejected()  
    boolean isResponseSemaphoreRejected()  
    boolean isResponseShortCircuited()  
    boolean isResponseThreadPoolRejected()  
    boolean isResponseTimedOut()  
    boolean isSuccessfulExecution()  
    rx.Observable<com.github.twitch4j.graphql.internal.FollowMutation.Data> observe()  
    protected boolean shouldNotBeWrapped​(java.lang.Throwable arg0)  
    protected boolean shouldOutputOnNextEvents()  
    rx.Observable<com.github.twitch4j.graphql.internal.FollowMutation.Data> toObservable()  

    Methods inherited from class com.github.twitch4j.graphql.command.BaseCommand

    run

    Methods inherited from class com.netflix.hystrix.HystrixCommand

    commandIsScalar, execute, getExecutionObservable, getFallback, getFallbackMethodName, getFallbackObservable, isFallbackUserDefined, queue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.netflix.hystrix.HystrixExecutable

    observe

    Methods inherited from interface com.netflix.hystrix.HystrixInvokableInfo

    getCommandGroup, getCommandKey, getCommandRunStartTimeInNanos, getEventCounts, getExecutionEvents, getExecutionTimeInMilliseconds, getFailedExecutionException, getMetrics, getNumberCollapsed, getNumberEmissions, getNumberFallbackEmissions, getOriginatingCollapserKey, getProperties, getPublicCacheKey, getThreadPoolKey, isCircuitBreakerOpen, isExecutedInThread, isExecutionComplete, isFailedExecution, isResponseFromCache, isResponseFromFallback, isResponseRejected, isResponseSemaphoreRejected, isResponseShortCircuited, isResponseThreadPoolRejected, isResponseTimedOut, isSuccessfulExecution

    Methods inherited from interface com.netflix.hystrix.HystrixObservable

    observe, toObservable
  • Field Details

    • circuitBreaker

      protected final com.netflix.hystrix.HystrixCircuitBreaker circuitBreaker
    • threadPool

      protected final com.netflix.hystrix.HystrixThreadPool threadPool
    • threadPoolKey

      protected final com.netflix.hystrix.HystrixThreadPoolKey threadPoolKey
    • properties

      protected final com.netflix.hystrix.HystrixCommandProperties properties
    • metrics

      protected final com.netflix.hystrix.HystrixCommandMetrics metrics
    • commandKey

      protected final com.netflix.hystrix.HystrixCommandKey commandKey
    • commandGroup

      protected final com.netflix.hystrix.HystrixCommandGroupKey commandGroup
    • eventNotifier

      protected final com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier eventNotifier
    • concurrencyStrategy

      protected final com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy concurrencyStrategy
    • executionHook

      protected final com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook executionHook
    • fallbackSemaphoreOverride

      protected final com.netflix.hystrix.AbstractCommand.TryableSemaphore fallbackSemaphoreOverride
    • fallbackSemaphorePerCircuit

      protected static final java.util.concurrent.ConcurrentHashMap<java.lang.String,​com.netflix.hystrix.AbstractCommand.TryableSemaphore> fallbackSemaphorePerCircuit
    • executionSemaphoreOverride

      protected final com.netflix.hystrix.AbstractCommand.TryableSemaphore executionSemaphoreOverride
    • executionSemaphorePerCircuit

      protected static final java.util.concurrent.ConcurrentHashMap<java.lang.String,​com.netflix.hystrix.AbstractCommand.TryableSemaphore> executionSemaphorePerCircuit
    • timeoutTimer

      protected final java.util.concurrent.atomic.AtomicReference<java.lang.ref.Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> timeoutTimer
    • commandState

      protected java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.CommandState> commandState
    • threadState

      protected java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.ThreadState> threadState
    • executionResult

      protected volatile com.netflix.hystrix.ExecutionResult executionResult
    • isResponseFromCache

      protected volatile boolean isResponseFromCache
    • executionResultAtTimeOfCancellation

      protected volatile com.netflix.hystrix.ExecutionResult executionResultAtTimeOfCancellation
    • commandStartTimestamp

      protected volatile long commandStartTimestamp
    • isCommandTimedOut

      protected final java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.TimedOutStatus> isCommandTimedOut
    • endCurrentThreadExecutingCommand

      protected volatile rx.functions.Action0 endCurrentThreadExecutingCommand
    • requestCache

      protected final com.netflix.hystrix.HystrixRequestCache requestCache
    • currentRequestLog

      protected final com.netflix.hystrix.HystrixRequestLog currentRequestLog
    • commandContainsFallback

      protected static java.util.concurrent.ConcurrentHashMap<com.netflix.hystrix.HystrixCommandKey,​java.lang.Boolean> commandContainsFallback
  • Constructor Details

    • CommandFollowUser

      public CommandFollowUser​(com.apollographql.apollo.ApolloClient apolloClient, java.lang.Long targetUserId, java.lang.Boolean goLiveNotification)
  • Method Details

    • getGraphQLCall

      protected com.apollographql.apollo.ApolloCall<com.github.twitch4j.graphql.internal.FollowMutation.Data> getGraphQLCall()
      Description copied from class: BaseCommand
      Abstract GraphQL Call
      Specified by:
      getGraphQLCall in class BaseCommand<com.github.twitch4j.graphql.internal.FollowMutation.Data>
      Returns:
      ApolloCall
    • observe

      public rx.Observable<com.github.twitch4j.graphql.internal.FollowMutation.Data> observe()
      Specified by:
      observe in interface com.netflix.hystrix.HystrixObservable<R extends java.lang.Object>
    • toObservable

      public rx.Observable<com.github.twitch4j.graphql.internal.FollowMutation.Data> toObservable()
      Specified by:
      toObservable in interface com.netflix.hystrix.HystrixObservable<R extends java.lang.Object>
    • shouldNotBeWrapped

      protected boolean shouldNotBeWrapped​(java.lang.Throwable arg0)
    • handleThreadEnd

      protected void handleThreadEnd​(com.netflix.hystrix.AbstractCommand<com.github.twitch4j.graphql.internal.FollowMutation.Data> arg0)
    • shouldOutputOnNextEvents

      protected boolean shouldOutputOnNextEvents()
    • getFallbackSemaphore

      protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getFallbackSemaphore()
    • getExecutionSemaphore

      protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getExecutionSemaphore()
    • getCommandGroup

      public com.netflix.hystrix.HystrixCommandGroupKey getCommandGroup()
      Specified by:
      getCommandGroup in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getCommandKey

      public com.netflix.hystrix.HystrixCommandKey getCommandKey()
      Specified by:
      getCommandKey in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getThreadPoolKey

      public com.netflix.hystrix.HystrixThreadPoolKey getThreadPoolKey()
      Specified by:
      getThreadPoolKey in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getMetrics

      public com.netflix.hystrix.HystrixCommandMetrics getMetrics()
      Specified by:
      getMetrics in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getProperties

      public com.netflix.hystrix.HystrixCommandProperties getProperties()
      Specified by:
      getProperties in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • decomposeException

      protected java.lang.Throwable decomposeException​(java.lang.Exception arg0)
    • getCacheKey

      protected java.lang.String getCacheKey()
    • getPublicCacheKey

      public java.lang.String getPublicCacheKey()
      Specified by:
      getPublicCacheKey in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isRequestCachingEnabled

      protected boolean isRequestCachingEnabled()
    • getLogMessagePrefix

      protected java.lang.String getLogMessagePrefix()
    • isCircuitBreakerOpen

      public boolean isCircuitBreakerOpen()
      Specified by:
      isCircuitBreakerOpen in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isExecutionComplete

      public boolean isExecutionComplete()
      Specified by:
      isExecutionComplete in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isExecutedInThread

      public boolean isExecutedInThread()
      Specified by:
      isExecutedInThread in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isSuccessfulExecution

      public boolean isSuccessfulExecution()
      Specified by:
      isSuccessfulExecution in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isFailedExecution

      public boolean isFailedExecution()
      Specified by:
      isFailedExecution in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getFailedExecutionException

      public java.lang.Throwable getFailedExecutionException()
      Specified by:
      getFailedExecutionException in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getExecutionException

      public java.lang.Throwable getExecutionException()
    • isResponseFromFallback

      public boolean isResponseFromFallback()
      Specified by:
      isResponseFromFallback in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseTimedOut

      public boolean isResponseTimedOut()
      Specified by:
      isResponseTimedOut in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseShortCircuited

      public boolean isResponseShortCircuited()
      Specified by:
      isResponseShortCircuited in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseFromCache

      public boolean isResponseFromCache()
      Specified by:
      isResponseFromCache in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseSemaphoreRejected

      public boolean isResponseSemaphoreRejected()
      Specified by:
      isResponseSemaphoreRejected in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseThreadPoolRejected

      public boolean isResponseThreadPoolRejected()
      Specified by:
      isResponseThreadPoolRejected in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • isResponseRejected

      public boolean isResponseRejected()
      Specified by:
      isResponseRejected in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getExecutionEvents

      public java.util.List<com.netflix.hystrix.HystrixEventType> getExecutionEvents()
      Specified by:
      getExecutionEvents in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getNumberEmissions

      public int getNumberEmissions()
      Specified by:
      getNumberEmissions in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getNumberFallbackEmissions

      public int getNumberFallbackEmissions()
      Specified by:
      getNumberFallbackEmissions in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getNumberCollapsed

      public int getNumberCollapsed()
      Specified by:
      getNumberCollapsed in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getOriginatingCollapserKey

      public com.netflix.hystrix.HystrixCollapserKey getOriginatingCollapserKey()
      Specified by:
      getOriginatingCollapserKey in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getExecutionTimeInMilliseconds

      public int getExecutionTimeInMilliseconds()
      Specified by:
      getExecutionTimeInMilliseconds in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getCommandRunStartTimeInNanos

      public long getCommandRunStartTimeInNanos()
      Specified by:
      getCommandRunStartTimeInNanos in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getEventCounts

      public com.netflix.hystrix.ExecutionResult.EventCounts getEventCounts()
      Specified by:
      getEventCounts in interface com.netflix.hystrix.HystrixInvokableInfo<R extends java.lang.Object>
    • getExceptionFromThrowable

      protected java.lang.Exception getExceptionFromThrowable​(java.lang.Throwable arg0)