blob: 0ef203976295879ea1a184c47b23277dd8a1db35 [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 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EvictionPolicy (Storm 2.4.0 API)</title>
<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="EvictionPolicy (Storm 2.4.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":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/EvictionPolicy.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><a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/windowing/EvictionPolicy.html" target="_top">Frames</a></li>
<li><a href="EvictionPolicy.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&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.storm.windowing</div>
<h2 title="Interface EvictionPolicy" class="title">Interface EvictionPolicy&lt;T,S&gt;</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/storm/windowing/CountEvictionPolicy.html" title="class in org.apache.storm.windowing">CountEvictionPolicy</a>, <a href="../../../../org/apache/storm/windowing/TimeEvictionPolicy.html" title="class in org.apache.storm.windowing">TimeEvictionPolicy</a>, <a href="../../../../org/apache/storm/windowing/WatermarkCountEvictionPolicy.html" title="class in org.apache.storm.windowing">WatermarkCountEvictionPolicy</a>, <a href="../../../../org/apache/storm/windowing/WatermarkTimeEvictionPolicy.html" title="class in org.apache.storm.windowing">WatermarkTimeEvictionPolicy</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">EvictionPolicy&lt;T,S&gt;</span></pre>
<div class="block"><p>Eviction policy tracks events and decides whether an event should be evicted from the window or not.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing">EvictionPolicy.Action</a></span></code>
<div class="block">The action to be taken when <a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#evict-org.apache.storm.windowing.Event-"><code>evict(Event)</code></a> is invoked.</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><a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing">EvictionPolicy.Action</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#evict-org.apache.storm.windowing.Event-">evict</a></span>(<a href="../../../../org/apache/storm/windowing/Event.html" title="interface in org.apache.storm.windowing">Event</a>&lt;<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">T</a>&gt;&nbsp;event)</code>
<div class="block">Decides if an event should be expired from the window, processed in the current window or kept for later processing.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing">EvictionContext</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#getContext--">getContext</a></span>()</code>
<div class="block">Returns the current context that is part of this eviction policy.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">S</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#getState--">getState</a></span>()</code>
<div class="block">Return runtime state to be checkpointed by the framework for restoring the eviction policy in case of failures.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#reset--">reset</a></span>()</code>
<div class="block">Resets the eviction policy.</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/storm/windowing/EvictionPolicy.html#restoreState-S-">restoreState</a></span>(<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">S</a>&nbsp;state)</code>
<div class="block">Restore the eviction policy from the state that was earlier checkpointed by the framework.</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/storm/windowing/EvictionPolicy.html#setContext-org.apache.storm.windowing.EvictionContext-">setContext</a></span>(<a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing">EvictionContext</a>&nbsp;context)</code>
<div class="block">Sets a context in the eviction policy that can be used while evicting the events.</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/storm/windowing/EvictionPolicy.html#track-org.apache.storm.windowing.Event-">track</a></span>(<a href="../../../../org/apache/storm/windowing/Event.html" title="interface in org.apache.storm.windowing">Event</a>&lt;<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">T</a>&gt;&nbsp;event)</code>
<div class="block">Tracks the event to later decide whether <a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#evict-org.apache.storm.windowing.Event-"><code>evict(Event)</code></a> should evict it or not.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="evict-org.apache.storm.windowing.Event-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>evict</h4>
<pre><a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing">EvictionPolicy.Action</a>&nbsp;evict(<a href="../../../../org/apache/storm/windowing/Event.html" title="interface in org.apache.storm.windowing">Event</a>&lt;<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">T</a>&gt;&nbsp;event)</pre>
<div class="block"><p>Decides if an event should be expired from the window, processed in the current window or kept for later processing.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>event</code> - the input event</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing"><code>EvictionPolicy.Action</code></a> to be taken based on the input event</dd>
</dl>
</li>
</ul>
<a name="track-org.apache.storm.windowing.Event-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>track</h4>
<pre>void&nbsp;track(<a href="../../../../org/apache/storm/windowing/Event.html" title="interface in org.apache.storm.windowing">Event</a>&lt;<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">T</a>&gt;&nbsp;event)</pre>
<div class="block"><p>Tracks the event to later decide whether <a href="../../../../org/apache/storm/windowing/EvictionPolicy.html#evict-org.apache.storm.windowing.Event-"><code>evict(Event)</code></a> should evict it or not.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>event</code> - the input event to be tracked</dd>
</dl>
</li>
</ul>
<a name="getContext--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContext</h4>
<pre><a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing">EvictionContext</a>&nbsp;getContext()</pre>
<div class="block"><p>Returns the current context that is part of this eviction policy.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the eviction context</dd>
</dl>
</li>
</ul>
<a name="setContext-org.apache.storm.windowing.EvictionContext-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setContext</h4>
<pre>void&nbsp;setContext(<a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing">EvictionContext</a>&nbsp;context)</pre>
<div class="block"><p>Sets a context in the eviction policy that can be used while evicting the events. E.g. For TimeEvictionPolicy, this could be used to set the reference timestamp.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the eviction context</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>void&nbsp;reset()</pre>
<div class="block"><p>Resets the eviction policy.</p></div>
</li>
</ul>
<a name="getState--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getState</h4>
<pre><a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">S</a>&nbsp;getState()</pre>
<div class="block"><p>Return runtime state to be checkpointed by the framework for restoring the eviction policy in case of failures.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the state</dd>
</dl>
</li>
</ul>
<a name="restoreState-java.lang.Object-">
<!-- -->
</a><a name="restoreState-S-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>restoreState</h4>
<pre>void&nbsp;restoreState(<a href="../../../../org/apache/storm/windowing/EvictionPolicy.html" title="type parameter in EvictionPolicy">S</a>&nbsp;state)</pre>
<div class="block"><p>Restore the eviction policy from the state that was earlier checkpointed by the framework.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>state</code> - the state</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/EvictionPolicy.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 class="aboutLanguage"><script type="text/javascript" src="../../../../highlight.pack.js"></script>
<script type="text/javascript"><!--
hljs.initHighlightingOnLoad();
//--></script></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/storm/windowing/EvictionContext.html" title="interface in org.apache.storm.windowing"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/windowing/EvictionPolicy.Action.html" title="enum in org.apache.storm.windowing"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/windowing/EvictionPolicy.html" target="_top">Frames</a></li>
<li><a href="EvictionPolicy.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&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>Field&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; 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>