public class UniformGranularitySpec extends Object implements GranularitySpec
Constructor and Description |
---|
UniformGranularitySpec(com.metamx.common.Granularity segmentGranularity,
QueryGranularity queryGranularity,
List<org.joda.time.Interval> inputIntervals) |
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<org.joda.time.Interval> |
bucketInterval(org.joda.time.DateTime dt)
Time-grouping interval corresponding to some instant, if any.
|
com.google.common.base.Optional<SortedSet<org.joda.time.Interval>> |
bucketIntervals()
Set of all time groups, broken up on segment boundaries.
|
com.google.common.base.Optional<List<org.joda.time.Interval>> |
getIntervals() |
QueryGranularity |
getQueryGranularity() |
com.metamx.common.Granularity |
getSegmentGranularity() |
public UniformGranularitySpec(com.metamx.common.Granularity segmentGranularity, QueryGranularity queryGranularity, List<org.joda.time.Interval> inputIntervals)
public com.google.common.base.Optional<SortedSet<org.joda.time.Interval>> bucketIntervals()
GranularitySpec
bucketIntervals
in interface GranularitySpec
public com.google.common.base.Optional<org.joda.time.Interval> bucketInterval(org.joda.time.DateTime dt)
GranularitySpec
bucketInterval
in interface GranularitySpec
dt
- instant to return time interval forpublic com.metamx.common.Granularity getSegmentGranularity()
getSegmentGranularity
in interface GranularitySpec
public QueryGranularity getQueryGranularity()
getQueryGranularity
in interface GranularitySpec
public com.google.common.base.Optional<List<org.joda.time.Interval>> getIntervals()
Copyright © 2011–2015. All rights reserved.