T - the return type@ThreadSafe
public abstract class AbstractHystrixCommand<T>
extends com.netflix.hystrix.HystrixCommand<T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
com.netflix.hystrix.AbstractCommand.CachedObservableOriginal<R> |
protected static class |
com.netflix.hystrix.AbstractCommand.CachedObservableResponse<R> |
protected static class |
com.netflix.hystrix.AbstractCommand.ObservableCommand<R> |
protected static class |
com.netflix.hystrix.AbstractCommand.TimedOutStatus |
| Modifier and Type | Field and Description |
|---|---|
protected com.netflix.hystrix.HystrixCircuitBreaker |
circuitBreaker |
protected com.netflix.hystrix.HystrixCommandGroupKey |
commandGroup |
protected com.netflix.hystrix.HystrixCommandKey |
commandKey |
protected com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy |
concurrencyStrategy |
protected com.netflix.hystrix.HystrixRequestLog |
currentRequestLog |
protected java.util.concurrent.atomic.AtomicReference<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.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 java.util.concurrent.atomic.AtomicBoolean |
isExecutionComplete |
protected com.netflix.hystrix.HystrixCommandMetrics |
metrics |
protected com.netflix.hystrix.HystrixCommandProperties |
properties |
protected com.netflix.hystrix.HystrixRequestCache |
requestCache |
protected java.util.concurrent.atomic.AtomicBoolean |
started |
protected com.netflix.hystrix.HystrixThreadPool |
threadPool |
protected com.netflix.hystrix.HystrixThreadPoolKey |
threadPoolKey |
protected java.util.concurrent.atomic.AtomicReference<java.lang.ref.Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> |
timeoutTimer |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHystrixCommand(HystrixCommandBuilder builder) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.RuntimeException |
decomposeException(java.lang.Exception arg0) |
protected void |
flushCache()
Clears cache for the specified hystrix command.
|
protected java.lang.String |
getCacheKey()
.
|
protected java.util.Collection<com.netflix.hystrix.HystrixCollapser.CollapsedRequest<java.lang.Object,java.lang.Object>> |
getCollapsedRequests()
Gets collapsed requests.
|
protected CommandAction |
getCommandAction()
Gets command action.
|
protected java.lang.Exception |
getExceptionFromThrowable(java.lang.Throwable arg0) |
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore |
getExecutionSemaphore() |
protected ExecutionType |
getExecutionType() |
protected T |
getFallback()
.
|
protected CommandAction |
getFallbackAction()
Gets fallback action.
|
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore |
getFallbackSemaphore() |
protected java.util.List<java.lang.Class<? extends java.lang.Throwable>> |
getIgnoreExceptions()
Gets exceptions types which should be ignored.
|
protected java.lang.String |
getLogMessagePrefix() |
protected void |
handleThreadEnd() |
protected boolean |
isRequestCachingEnabled() |
protected void |
recordExecutedCommand() |
protected abstract T |
run()
.
|
protected boolean |
shouldOutputOnNextEvents() |
protected final com.netflix.hystrix.HystrixCircuitBreaker circuitBreaker
protected final com.netflix.hystrix.HystrixThreadPool threadPool
protected final com.netflix.hystrix.HystrixThreadPoolKey threadPoolKey
protected final com.netflix.hystrix.HystrixCommandProperties properties
protected final com.netflix.hystrix.HystrixCommandMetrics metrics
protected final com.netflix.hystrix.HystrixCommandKey commandKey
protected final com.netflix.hystrix.HystrixCommandGroupKey commandGroup
protected final com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier eventNotifier
protected final com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy concurrencyStrategy
protected final com.netflix.hystrix.strategy.executionhook.HystrixCommandExecutionHook executionHook
protected final com.netflix.hystrix.AbstractCommand.TryableSemaphore fallbackSemaphoreOverride
protected static final java.util.concurrent.ConcurrentHashMap<java.lang.String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> fallbackSemaphorePerCircuit
protected final com.netflix.hystrix.AbstractCommand.TryableSemaphore executionSemaphoreOverride
protected static final java.util.concurrent.ConcurrentHashMap<java.lang.String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> executionSemaphorePerCircuit
protected final java.util.concurrent.atomic.AtomicReference<java.lang.ref.Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> timeoutTimer
protected java.util.concurrent.atomic.AtomicBoolean started
protected volatile com.netflix.hystrix.ExecutionResult executionResult
protected final java.util.concurrent.atomic.AtomicReference<com.netflix.hystrix.AbstractCommand.TimedOutStatus> isCommandTimedOut
protected final java.util.concurrent.atomic.AtomicBoolean isExecutionComplete
protected final java.util.concurrent.atomic.AtomicReference<rx.functions.Action0> endCurrentThreadExecutingCommand
protected final com.netflix.hystrix.HystrixRequestCache requestCache
protected final com.netflix.hystrix.HystrixRequestLog currentRequestLog
protected AbstractHystrixCommand(HystrixCommandBuilder builder)
protected CommandAction getCommandAction()
protected CommandAction getFallbackAction()
protected java.util.Collection<com.netflix.hystrix.HystrixCollapser.CollapsedRequest<java.lang.Object,java.lang.Object>> getCollapsedRequests()
protected java.util.List<java.lang.Class<? extends java.lang.Throwable>> getIgnoreExceptions()
protected ExecutionType getExecutionType()
protected java.lang.String getCacheKey()
protected abstract T run() throws java.lang.Exception
run in class com.netflix.hystrix.HystrixCommand<T>java.lang.Exceptionprotected T getFallback()
getFallback in class com.netflix.hystrix.HystrixCommand<T>protected void flushCache()
protected void handleThreadEnd()
protected boolean shouldOutputOnNextEvents()
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getFallbackSemaphore()
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getExecutionSemaphore()
protected void recordExecutedCommand()
protected java.lang.RuntimeException decomposeException(java.lang.Exception arg0)
protected boolean isRequestCachingEnabled()
protected java.lang.String getLogMessagePrefix()
protected java.lang.Exception getExceptionFromThrowable(java.lang.Throwable arg0)