Package org.yamcs.yarch
Class PartitionManager.Interval
- java.lang.Object
-
- org.yamcs.utils.TimeInterval
-
- org.yamcs.yarch.PartitionManager.Interval
-
- Enclosing class:
- PartitionManager
public static class PartitionManager.Interval extends TimeInterval implements Iterable<Partition>
For tables partitioned by time this holds all the partitions for a given time interval. For example if YYYY schema is used, this holds all the partitions for one year.For tables not partitioned by time, this holds all the partitions (by value) for the table and there is only one instance of this class for that table.
Practically it keeps a value -> partition map.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.utils.TimeInterval
TimeInterval.FilterOverlappingIterator<T extends TimeInterval>
-
-
Constructor Summary
Constructors Constructor Description Interval()Constructs an interval without start or stop (covers all time)Interval(long start, long stop)Interval(TimeInterval intv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object value, Partition partition)Add a partitionvoidaddHistogram(String columnName, HistogramInfo histo)voidaddTimePartition(Partition partition)Partitionget(Object value)Get the partition corresponding to the valueHistogramInfogetHistogram(String columnName)Collection<HistogramInfo>getHistograms()List<Partition>getPartitionList()Map<Object,Partition>getPartitions()Iterator<Partition>iterator()Iterates over the partitions from this intervalCollection<HistogramInfo>removeHistograms()intsize()StringtoString()-
Methods inherited from class org.yamcs.utils.TimeInterval
contains0, getEnd, getStart, hasEnd, hasStart, openEnd, openStart, setEnd, setStart, toStringEncoded
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Interval
public Interval(long start, long stop)
-
Interval
public Interval()
Constructs an interval without start or stop (covers all time)
-
Interval
public Interval(TimeInterval intv)
-
-
Method Detail
-
get
public Partition get(Object value)
Get the partition corresponding to the value- Parameters:
value-- Returns:
-
addTimePartition
public void addTimePartition(Partition partition)
-
add
public void add(Object value, Partition partition)
Add a partition- Parameters:
value- - can be null in case of time based partitioning
-
addHistogram
public void addHistogram(String columnName, HistogramInfo histo)
-
getHistogram
public HistogramInfo getHistogram(String columnName)
-
getHistograms
public Collection<HistogramInfo> getHistograms()
-
size
public int size()
- Returns:
- the number of partitions in this interval
-
removeHistograms
public Collection<HistogramInfo> removeHistograms()
-
toString
public String toString()
- Overrides:
toStringin classTimeInterval
-
-