@ManagedResource(description="Managed Hystrix EventStreamService")
public class HystrixEventStreamService
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.StaticService, com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller.MetricsAsJsonPollerListener
HystrixEventStreamServlet
servlet which
provides such functionality.Modifier and Type | Field and Description |
---|---|
static int |
METRICS_QUEUE_SIZE |
Constructor and Description |
---|
HystrixEventStreamService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
int |
getDelay() |
int |
getPollerDelay() |
int |
getQueueSize() |
void |
handleJsonMetric(String json) |
boolean |
isPollerRunning() |
String |
oldestMetricsAsJSon() |
void |
pausePoller() |
void |
setDelay(int delay)
Sets the delay in millis how often the poller runs
|
void |
setQueueSize(int queueSize)
Sets the queue size for how many metrics collected are stored in-memory in a backlog
|
void |
startPoller() |
Stream<String> |
streamMetrics()
Return a stream of the JSon metrics.
|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public static final int METRICS_QUEUE_SIZE
public int getDelay()
public void setDelay(int delay)
public int getQueueSize()
public void setQueueSize(int queueSize)
@ManagedOperation(description="Returns the oldest metrics as JSon format") public String oldestMetricsAsJSon()
@ManagedOperation(description="Starts the metrics poller") public void startPoller()
@ManagedOperation(description="Pauses the metrics poller") public void pausePoller()
@ManagedAttribute(description="Is the metrics poller running") public boolean isPollerRunning()
@ManagedAttribute(description="The delay in millis the poller is running") public int getPollerDelay()
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
public void handleJsonMetric(String json)
handleJsonMetric
in interface com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsPoller.MetricsAsJsonPollerListener
Apache Camel