Class OndemandHystrixCommandFactory.OndemandHystrixCommand<E>

  • All Implemented Interfaces:
    com.netflix.hystrix.HystrixExecutable<E>
    Enclosing class:
    OndemandHystrixCommandFactory

    public class OndemandHystrixCommandFactory.OndemandHystrixCommand<E>
    extends com.netflix.hystrix.HystrixCommand<E>
    Class used for creating HystrixCommand threads. This allows us to run code separate from the acc local thread. It also allows us to provide both a timeout for the run event and a fallback strategy if either an error occurred or we exceeded the timeout limit.
    • Method Detail

      • run

        protected E run()
        Specified by:
        run in class com.netflix.hystrix.HystrixCommand<E>
      • canRunEvent

        protected boolean canRunEvent()
      • getFallback

        protected E getFallback()
        Overrides:
        getFallback in class com.netflix.hystrix.HystrixCommand<E>
      • getEventSession

        public Session getEventSession()
      • setEventSession

        public void setEventSession​(Session eventSession)
      • getSessionAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getSessionAttributes()
      • setSessionAttributes

        public void setSessionAttributes​(java.util.Map<java.lang.String,​java.lang.Object> sessionAttributes)
      • setTenant

        public void setTenant​(Tenant tenant)
      • getTenant

        protected Tenant getTenant()
      • isExternalCallsEnabled

        public boolean isExternalCallsEnabled()
      • setExternalCallsEnabled

        public void setExternalCallsEnabled​(boolean externalCallsEnabled)