
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier
public abstract class HystrixEventNotifier
Abstract EventNotifier that allows receiving notifications for different events with default implementations.
See HystrixPlugins or the Hystrix GitHub Wiki for information on configuring plugins: https://github.com/Netflix/Hystrix/wiki/Plugins.
Note on thread-safety and performance
A single implementation of this class will be used globally so methods on this class will be invoked concurrently from multiple threads so all functionality must be thread-safe.
Methods are also invoked synchronously and will add to execution time of the commands so all behavior should be fast. If anything time-consuming is to be done it should be spawned asynchronously onto separate worker threads.
| Constructor Summary | |
|---|---|
HystrixEventNotifier()
|
|
| Method Summary | |
|---|---|
void |
markCommandExecution(HystrixCommandKey key,
HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy,
int duration,
java.util.List<HystrixEventType> eventsDuringExecution)
Called after a command is executed using thread isolation. |
void |
markEvent(HystrixEventType eventType,
HystrixCommandKey key)
Called for every event fired. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HystrixEventNotifier()
| Method Detail |
|---|
public void markEvent(HystrixEventType eventType,
HystrixCommandKey key)
Default Implementation: Does nothing
eventType - key -
public void markCommandExecution(HystrixCommandKey key,
HystrixCommandProperties.ExecutionIsolationStrategy isolationStrategy,
int duration,
java.util.List<HystrixEventType> eventsDuringExecution)
Will not get called if a command is rejected, short-circuited etc.
Default Implementation: Does nothing
key - HystrixCommandKey of command instance.isolationStrategy - HystrixCommandProperties.ExecutionIsolationStrategy the isolation strategy used by the command when executedduration - time in milliseconds of executing run() methodeventsDuringExecution - List<HystrixEventType> of events occurred during execution.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||