public class Hystrix
extends java.lang.Object
Constructor and Description |
---|
Hystrix() |
Modifier and Type | Method and Description |
---|---|
static HystrixCommandKey |
getCurrentThreadExecutingCommand()
Allows a thread to query whether it's current point of execution is within the scope of a HystrixCommand.
|
static void |
reset()
Reset state and release resources in use (such as thread-pools).
|
static void |
reset(long time,
java.util.concurrent.TimeUnit unit)
Reset state and release resources in use (such as threadpools) and wait for completion.
|
public static void reset()
NOTE: This can result in race conditions if HystrixCommands are concurrently being executed.
public static void reset(long time, java.util.concurrent.TimeUnit unit)
NOTE: This can result in race conditions if HystrixCommands are concurrently being executed.
time
- time to wait for thread-pools to shutdownunit
- TimeUnit
for timeto wait for thread-pools to shutdown
public static HystrixCommandKey getCurrentThreadExecutingCommand()
When ExecutionIsolationStrategy is THREAD then this applies to the isolation (child/worker) thread not the calling thread.
When ExecutionIsolationStrategy is SEMAPHORE this applies to the calling thread.