DataPipe
, DataPipeForked
, IDataSink
, IDataSource
AccumulatorAutocorrelationPTensor
, AccumulatorAutocorrelationShearStress
, AccumulatorAverage
, AccumulatorAverageBlockless
, AccumulatorAverageBlocklessSlim
, AccumulatorAverageBootstrap
, AccumulatorAverageCollapsingLog
, AccumulatorCounter
, AccumulatorHistogram
, AccumulatorHistory
public abstract class DataAccumulator extends DataProcessorForked implements IDataSource
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
active |
Flag specifying whether the manager responds to integrator events
|
protected boolean |
hasUnpushedData |
|
protected long |
pushInterval |
Accumulated data are pushed to the data sinks after every pushInterval calls
|
protected long |
putCount |
Counter that keeps track of the number of interval events
received since last call to updateSums
|
dataInfo, dataSink, tag
Constructor | Description |
---|---|
DataAccumulator() |
Constructs accumulator with no initial DataSink.
|
Modifier and Type | Method | Description |
---|---|---|
protected abstract boolean |
addData(IData data) |
Defined by subclass to specify what this accumulator does when data is added to it.
|
abstract IData |
getData() |
|
long |
getPushInterval() |
Accumulated data are pushed to the data sinks after every pushInterval calls
to putData.
|
boolean |
isActive() |
|
protected IData |
processData(IData inputData) |
Returns getData() every pushInterval times it is invoked, otherwise returns null
(thereby preventing transmission of data to the next DataSinks).
|
abstract void |
reset() |
Clear accumulated values.
|
void |
setActive(boolean active) |
|
void |
setPushInterval(long i) |
Accumulated data are pushed to the data sinks after every pushInterval calls
to putData.
|
java.lang.String |
toString() |
getDataInfo, getTag, processDataInfo, putData, putDataInfo
addDataSink, getDataSink, getDataSinks, removeDataSink, setDataSink, setDataSinks
putData, putDataInfo
getDataInfo, getTag
protected long putCount
protected long pushInterval
protected boolean active
protected boolean hasUnpushedData
public DataAccumulator()
protected abstract boolean addData(IData data)
data
- the data to be processedpublic abstract void reset()
public abstract IData getData()
getData
in interface IDataSource
protected IData processData(IData inputData)
processData
in class DataProcessor
inputData
- data to be processed.public boolean isActive()
public final void setActive(boolean active)
active
- Sets whether accumulation is to be performed in response to interval events.public final long getPushInterval()
public final void setPushInterval(long i)
i
- the pushInterval to be set.java.lang.IllegalArgumentException
- if argument is less than or equal to zero.public java.lang.String toString()
toString
in class java.lang.Object