blob: 862148aa214d9d05250f709b4da8fe6045f2ea04 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon Dec 18 11:25:21 EST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>StreamScopeMXBean (Apache Edgent (incubating) v1.2.0 API)</title>
<meta name="date" content="2017-12-18">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StreamScopeMXBean (Apache Edgent (incubating) v1.2.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StreamScopeMXBean.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeRegistryMXBean.html" title="interface in org.apache.edgent.streamscope.mbeans"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html" target="_top">Frames</a></li>
<li><a href="StreamScopeMXBean.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.edgent.streamscope.mbeans</div>
<h2 title="Interface StreamScopeMXBean" class="title">Interface StreamScopeMXBean</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../org/apache/edgent/streamscope/StreamScopeBean.html" title="class in org.apache.edgent.streamscope">StreamScopeBean</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">StreamScopeMXBean</span></pre>
<div class="block">A Stream "oscilloscope" for capturing stream tuples for analysis / debug.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeRegistryMXBean.html" title="interface in org.apache.edgent.streamscope.mbeans"><code>StreamScopeRegistryMXBean</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#TYPE">TYPE</a></span></code>
<div class="block">TYPE is used to identify this bean as a StreamScope bean when building the bean's <code>ObjectName</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#getSampleCount--">getSampleCount</a></span>()</code>
<div class="block">Get the number of Samples currently captured</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#getSamples--">getSamples</a></span>()</code>
<div class="block">Get all captured tuples as JSON.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#isEnabled--">isEnabled</a></span>()</code>
<div class="block">Is tuple capture enabled?</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#isPaused--">isPaused</a></span>()</code>
<div class="block">Is capture paused?</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setCaptureByCount-int-">setCaptureByCount</a></span>(int&nbsp;count)</code>
<div class="block">Capture the first and every nth tuple</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setCaptureByTime-long-java.util.concurrent.TimeUnit-">setCaptureByTime</a></span>(long&nbsp;elapsed,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</code>
<div class="block">Capture the 1st tuple and then the next tuple after <code>period</code>
<code>unit</code> time has elapsed since the previous captured tuple.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setEnabled-boolean-">setEnabled</a></span>(boolean&nbsp;isEnabled)</code>
<div class="block">Enable or disable tuple capture.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setMaxRetentionCount-int-">setMaxRetentionCount</a></span>(int&nbsp;maxCount)</code>
<div class="block">Set the maximum number of tuples to retain.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setMaxRetentionTime-long-java.util.concurrent.TimeUnit-">setMaxRetentionTime</a></span>(long&nbsp;age,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</code>
<div class="block">Set the maximum retention time of a tuple.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setPaused-boolean-">setPaused</a></span>(boolean&nbsp;paused)</code>
<div class="block">Set capture paused control</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="TYPE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TYPE</h4>
<pre>static final&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> TYPE</pre>
<div class="block">TYPE is used to identify this bean as a StreamScope bean when building the bean's <code>ObjectName</code>.
The value is "streamScope"</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.edgent.streamscope.mbeans.StreamScopeMXBean.TYPE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isEnabled--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEnabled</h4>
<pre>boolean&nbsp;isEnabled()</pre>
<div class="block">Is tuple capture enabled?</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if enabled.</dd>
</dl>
</li>
</ul>
<a name="setEnabled-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnabled</h4>
<pre>void&nbsp;setEnabled(boolean&nbsp;isEnabled)</pre>
<div class="block">Enable or disable tuple capture.
<P>
Disabling releases the capture buffer.
</P></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>isEnabled</code> - true to enable, false to disable.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html#setPaused-boolean-"><code>setPaused(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="isPaused--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPaused</h4>
<pre>boolean&nbsp;isPaused()</pre>
<div class="block">Is capture paused?</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if paused</dd>
</dl>
</li>
</ul>
<a name="setPaused-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPaused</h4>
<pre>void&nbsp;setPaused(boolean&nbsp;paused)</pre>
<div class="block">Set capture paused control
<P>
Pausing doesn't affect the capture buffer's current contents.
</P></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>paused</code> - true to pause, false to clear pause.</dd>
</dl>
</li>
</ul>
<a name="getSamples--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSamples</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getSamples()</pre>
<div class="block">Get all captured tuples as JSON.
<P>
The JSON is that generated by <code>Gson.toJson(StreamScope.getSamples())</code>.
</P><P>
The JSON is an array of <a href="../../../../../org/apache/edgent/streamscope/StreamScope.Sample.html" title="class in org.apache.edgent.streamscope"><code>Sample</code></a> JSON objects.
Each Sample JSON object consists of:
<UL>
<LI>ts - long. capture timestamp in millis from System.currentTimeMillis()</LI>
<LI>nanos - long. capture nanosecond timestamp from System.nanoTime()</LI>
<LI>tuple - see below</LI>
</UL>
The value of the "tuple" property is:
<UL>
<LI>for a primitive tuple type like String, Numeric or Boolean it's a
JSON string, numeric, or boolean value respectively.</LI>
<LI>Arrays or collections are a JSON array of JSON elements for the members.</LI>
<LI>For other types it's a JSON object with the type's
members and JSON encoding of their values.</LI>
</UL>
<P>
The returned samples are removed from the capture buffer.
</P></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>JSON of the captured samples</dd>
</dl>
</li>
</ul>
<a name="getSampleCount--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSampleCount</h4>
<pre>int&nbsp;getSampleCount()</pre>
<div class="block">Get the number of Samples currently captured</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the count</dd>
</dl>
</li>
</ul>
<a name="setMaxRetentionCount-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxRetentionCount</h4>
<pre>void&nbsp;setMaxRetentionCount(int&nbsp;maxCount)</pre>
<div class="block">Set the maximum number of tuples to retain.
<P>
The capture buffer is cleared.
</P></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>maxCount</code> - the maximum number of tuples to retain.
Specify 0 to disable count based retention.</dd>
</dl>
</li>
</ul>
<a name="setMaxRetentionTime-long-java.util.concurrent.TimeUnit-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxRetentionTime</h4>
<pre>void&nbsp;setMaxRetentionTime(long&nbsp;age,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</pre>
<div class="block">Set the maximum retention time of a tuple.
<P>
The capture buffer is cleared.
</P></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>age</code> - the amount of time to retain a tuple.
Specify 0 to disable age based retention.</dd>
<dd><code>unit</code> - <a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent"><code>TimeUnit</code></a></dd>
</dl>
</li>
</ul>
<a name="setCaptureByCount-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCaptureByCount</h4>
<pre>void&nbsp;setCaptureByCount(int&nbsp;count)</pre>
<div class="block">Capture the first and every nth tuple</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>count</code> - the nth value interval</dd>
</dl>
</li>
</ul>
<a name="setCaptureByTime-long-java.util.concurrent.TimeUnit-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setCaptureByTime</h4>
<pre>void&nbsp;setCaptureByTime(long&nbsp;elapsed,
<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</a>&nbsp;unit)</pre>
<div class="block">Capture the 1st tuple and then the next tuple after <code>period</code>
<code>unit</code> time has elapsed since the previous captured tuple.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>elapsed</code> - time to delay until next capture</dd>
<dd><code>unit</code> - <a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent"><code>TimeUnit</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StreamScopeMXBean.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../org/apache/edgent/streamscope/mbeans/StreamScopeRegistryMXBean.html" title="interface in org.apache.edgent.streamscope.mbeans"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/edgent/streamscope/mbeans/StreamScopeMXBean.html" target="_top">Frames</a></li>
<li><a href="StreamScopeMXBean.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>