public interface StreamScopeMXBean
StreamScopeRegistryMXBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPE
TYPE is used to identify this bean as a StreamScope bean when building the bean's
ObjectName . |
Modifier and Type | Method and Description |
---|---|
int |
getSampleCount()
Get the number of Samples currently captured
|
java.lang.String |
getSamples()
Get all captured tuples as JSON.
|
boolean |
isEnabled()
Is tuple capture enabled?
|
boolean |
isPaused()
Is capture paused?
|
void |
setCaptureByCount(int count)
Capture the first and every nth tuple
|
void |
setCaptureByTime(long elapsed,
java.util.concurrent.TimeUnit unit)
Capture the 1st tuple and then the next tuple after
period
unit time has elapsed since the previous captured tuple. |
void |
setEnabled(boolean isEnabled)
Enable or disable tuple capture.
|
void |
setMaxRetentionCount(int maxCount)
Set the maximum number of tuples to retain.
|
void |
setMaxRetentionTime(long age,
java.util.concurrent.TimeUnit unit)
Set the maximum retention time of a tuple.
|
void |
setPaused(boolean paused)
Set capture paused control
|
static final java.lang.String TYPE
ObjectName
.
The value is "streamScope"boolean isEnabled()
void setEnabled(boolean isEnabled)
Disabling releases the capture buffer.
isEnabled
- true to enable, false to disable.setPaused(boolean)
boolean isPaused()
void setPaused(boolean paused)
Pausing doesn't affect the capture buffer's current contents.
paused
- true to pause, false to clear pause.java.lang.String getSamples()
The JSON is that generated by Gson.toJson(StreamScope.getSamples())
.
The JSON is an array of Sample
JSON objects.
Each Sample JSON object consists of:
The returned samples are removed from the capture buffer.
int getSampleCount()
void setMaxRetentionCount(int maxCount)
The capture buffer is cleared.
maxCount
- the maximum number of tuples to retain.
Specify 0 to disable count based retention.void setMaxRetentionTime(long age, java.util.concurrent.TimeUnit unit)
The capture buffer is cleared.
age
- the amount of time to retain a tuple.
Specify 0 to disable age based retention.unit
- TimeUnit
void setCaptureByCount(int count)
count
- the nth value intervalvoid setCaptureByTime(long elapsed, java.util.concurrent.TimeUnit unit)
period
unit
time has elapsed since the previous captured tuple.elapsed
- time to delay until next captureunit
- TimeUnit
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641