public class TimeRate extends AbstractProcessor implements StatisticsService
| Modifier and Type | Field and Description |
|---|---|
protected Integer |
every |
protected String |
id |
protected String |
index |
(package private) static org.slf4j.Logger |
log |
protected Long |
nowIndex |
protected Double |
rate |
protected Long |
start |
protected Long |
startIndex |
context| Constructor and Description |
|---|
TimeRate() |
| Modifier and Type | Method and Description |
|---|---|
void |
finish() |
Integer |
getEvery() |
String |
getId() |
String |
getIndex() |
private Long |
getIndex(Data data) |
Statistics |
getStatistics() |
void |
init(ProcessContext ctx) |
Data |
process(Data data) |
void |
reset() |
void |
setEvery(Integer every) |
void |
setId(String id) |
void |
setIndex(String index) |
resetStatestatic org.slf4j.Logger log
protected Long start
protected Long startIndex
protected Long nowIndex
protected Double rate
protected Integer every
protected String id
protected String index
public String getId()
public void setId(String id)
id - the id to setpublic String getIndex()
public void setIndex(String index)
public void init(ProcessContext ctx) throws Exception
init in interface StatefulProcessorinit in class AbstractProcessorExceptionAbstractProcessor.init(stream.ProcessContext)public void finish()
throws Exception
finish in interface StatefulProcessorfinish in class AbstractProcessorExceptionAbstractProcessor.finish()public void reset()
throws Exception
public Statistics getStatistics()
getStatistics in interface StatisticsServicepublic Integer getEvery()
public void setEvery(Integer every)
every - the every to setCopyright © 2014. All rights reserved.