public class TimewarpOperator<T> extends Object implements PostProcessingOperator<T>
| Constructor and Description |
|---|
TimewarpOperator(org.joda.time.Interval dataInterval,
org.joda.time.Period period,
org.joda.time.DateTime origin) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
computeOffset(long t)
Map time t into the last `period` ending within `dataInterval`
|
QueryRunner<T> |
postProcess(QueryRunner<T> baseQueryRunner) |
QueryRunner<T> |
postProcess(QueryRunner<T> baseRunner,
long now) |
public TimewarpOperator(org.joda.time.Interval dataInterval,
org.joda.time.Period period,
org.joda.time.DateTime origin)
dataInterval - interval containing the actual dataperiod - time will be offset by a multiple of the given period
until there is at least a full period ending within the data intervalorigin - origin to be used to align time periods
(e.g. to determine on what day of the week a weekly period starts)public QueryRunner<T> postProcess(QueryRunner<T> baseQueryRunner)
postProcess in interface PostProcessingOperator<T>public QueryRunner<T> postProcess(QueryRunner<T> baseRunner, long now)
protected long computeOffset(long t)
t - the current time to be mapped into `dataInterval`Copyright © 2011–2017. All rights reserved.