T
- Return type of the OData request.public class ODataRequestCommand<T> extends ErpCommand<T>
ErpCommand
for executing an OData request
without caching the result.
The OData request is represented by the fully prepared fluent helper, which is executed on the given
ErpConfigContext
when this command is being executed.Modifier and Type | Class and Description |
---|---|
protected static class |
com.netflix.hystrix.AbstractCommand.CommandState |
protected static class |
com.netflix.hystrix.AbstractCommand.ThreadState |
protected static class |
com.netflix.hystrix.AbstractCommand.TimedOutStatus |
Modifier and Type | Field and Description |
---|---|
protected com.netflix.hystrix.HystrixCircuitBreaker |
circuitBreaker |
protected static ConcurrentHashMap<com.netflix.hystrix.HystrixCommandKey,Boolean> |
commandContainsFallback |
protected com.netflix.hystrix.HystrixCommandGroupKey |
commandGroup |
protected com.netflix.hystrix.HystrixCommandKey |
commandKey |
protected long |
commandStartTimestamp |
protected 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 ConcurrentHashMap<String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> |
executionSemaphorePerCircuit |
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore |
fallbackSemaphoreOverride |
protected static ConcurrentHashMap<String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> |
fallbackSemaphorePerCircuit |
protected 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 AtomicReference<com.netflix.hystrix.AbstractCommand.ThreadState> |
threadState |
protected AtomicReference<Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> |
timeoutTimer |
Constructor and Description |
---|
ODataRequestCommand(FluentHelperBasic<?,?,T> oDataRequest)
Creates an
ODataRequestCommand instance with a default configuration context. |
ODataRequestCommand(FluentHelperBasic<?,?,T> oDataRequest,
ErpConfigContext configContext)
Creates an
ODataRequestCommand instance. |
ODataRequestCommand(FluentHelperBasic<?,?,T> oDataRequest,
com.netflix.hystrix.HystrixCommand.Setter setter)
Creates an
ODataRequestCommand instance. |
ODataRequestCommand(FluentHelperBasic<?,?,T> oDataRequest,
com.netflix.hystrix.HystrixCommand.Setter setter,
ErpConfigContext configContext)
Creates an
ODataRequestCommand instance. |
Modifier and Type | Method and Description |
---|---|
protected Throwable |
decomposeException(Exception arg0) |
protected String |
getCacheKey() |
protected Exception |
getExceptionFromThrowable(Throwable arg0) |
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore |
getExecutionSemaphore() |
protected T |
getFallback() |
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore |
getFallbackSemaphore() |
protected String |
getLogMessagePrefix() |
FluentHelperBasic<?,?,T> |
getODataRequest()
Returns the OData request that will be executed by this command.
|
protected void |
handleThreadEnd(com.netflix.hystrix.AbstractCommand<R> arg0) |
protected boolean |
isRequestCachingEnabled() |
protected T |
run() |
protected boolean |
shouldNotBeWrapped(Throwable arg0) |
protected boolean |
shouldOutputOnNextEvents() |
ODataRequestCommand<T> |
withFallback(Function<Throwable,T> fallbackFunction)
Registers a fallback for this command.
|
getConfigContext
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 ConcurrentHashMap<String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> fallbackSemaphorePerCircuit
protected final com.netflix.hystrix.AbstractCommand.TryableSemaphore executionSemaphoreOverride
protected static final ConcurrentHashMap<String,com.netflix.hystrix.AbstractCommand.TryableSemaphore> executionSemaphorePerCircuit
protected final AtomicReference<Reference<com.netflix.hystrix.util.HystrixTimer.TimerListener>> timeoutTimer
protected AtomicReference<com.netflix.hystrix.AbstractCommand.CommandState> commandState
protected AtomicReference<com.netflix.hystrix.AbstractCommand.ThreadState> threadState
protected volatile com.netflix.hystrix.ExecutionResult executionResult
protected volatile boolean isResponseFromCache
protected volatile com.netflix.hystrix.ExecutionResult executionResultAtTimeOfCancellation
protected volatile long commandStartTimestamp
protected final AtomicReference<com.netflix.hystrix.AbstractCommand.TimedOutStatus> isCommandTimedOut
protected volatile rx.functions.Action0 endCurrentThreadExecutingCommand
protected final com.netflix.hystrix.HystrixRequestCache requestCache
protected final com.netflix.hystrix.HystrixRequestLog currentRequestLog
protected static ConcurrentHashMap<com.netflix.hystrix.HystrixCommandKey,Boolean> commandContainsFallback
public ODataRequestCommand(@Nonnull FluentHelperBasic<?,?,T> oDataRequest)
ODataRequestCommand
instance with a default configuration context.oDataRequest
- The OData request to be executed by this command, as a fully prepared fluent helper.public ODataRequestCommand(@Nonnull FluentHelperBasic<?,?,T> oDataRequest, @Nonnull ErpConfigContext configContext)
ODataRequestCommand
instance.oDataRequest
- The OData request to be executed by this command, as a fully prepared fluent helper.configContext
- The configuration context with which the given request will be executed.public ODataRequestCommand(@Nonnull FluentHelperBasic<?,?,T> oDataRequest, @Nonnull com.netflix.hystrix.HystrixCommand.Setter setter)
ODataRequestCommand
instance.oDataRequest
- The OData request to be executed by this command, as a fully prepared fluent helper.setter
- The configuration of the command.public ODataRequestCommand(@Nonnull FluentHelperBasic<?,?,T> oDataRequest, @Nonnull com.netflix.hystrix.HystrixCommand.Setter setter, @Nonnull ErpConfigContext configContext)
ODataRequestCommand
instance.oDataRequest
- The OData request to be executed by this command, as a fully prepared fluent helper.setter
- The configuration of the command.configContext
- The configuration context with which the given request will be executed.@Nonnull public ODataRequestCommand<T> withFallback(@Nonnull Function<Throwable,T> fallbackFunction)
fallbackFunction
- The fallback function to be used.protected T run() throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
run
in class com.netflix.hystrix.HystrixCommand<T>
com.sap.cloud.sdk.odatav2.connectivity.ODataException
protected T getFallback()
getFallback
in class com.netflix.hystrix.HystrixCommand<T>
@Nonnull public FluentHelperBasic<?,?,T> getODataRequest()
protected boolean shouldNotBeWrapped(Throwable arg0)
protected void handleThreadEnd(com.netflix.hystrix.AbstractCommand<R> arg0)
protected boolean shouldOutputOnNextEvents()
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getFallbackSemaphore()
protected com.netflix.hystrix.AbstractCommand.TryableSemaphore getExecutionSemaphore()
protected String getCacheKey()
protected boolean isRequestCachingEnabled()
protected String getLogMessagePrefix()
Copyright © 2018 SAP SE. All rights reserved.