Class PartitionHolder<T extends Overshadowable<T>>
- java.lang.Object
-
- org.apache.druid.timeline.partition.PartitionHolder<T>
-
- All Implemented Interfaces:
Iterable<PartitionChunk<T>>
public class PartitionHolder<T extends Overshadowable<T>> extends Object implements Iterable<PartitionChunk<T>>
An object that clumps together multiple other objects which each represent a shard of some space.
-
-
Constructor Summary
Constructors Modifier Constructor Description PartitionHolder(List<PartitionChunk<T>> initialChunks)protectedPartitionHolder(org.apache.druid.timeline.partition.OvershadowableManager<T> overshadowableManager, short maxMinorVersion)PartitionHolder(PartitionChunk<T> initialChunk)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(PartitionChunk<T> chunk)static <T extends Overshadowable<T>>
PartitionHolder<T>copyWithOnlyVisibleChunks(PartitionHolder<T> partitionHolder)static <T extends Overshadowable<T>>
PartitionHolder<T>deepCopy(PartitionHolder<T> partitionHolder)booleanequals(Object o)PartitionChunk<T>getChunk(int partitionNum)shortgetMaxMinorVersion()Returns the maximum minor version across all the added segments.List<PartitionChunk<T>>getOvershadowed()booleanhasData()inthashCode()booleanisComplete()booleanisEmpty()Iterator<PartitionChunk<T>>iterator()Iterable<T>payloads()PartitionChunk<T>remove(PartitionChunk<T> chunk)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
PartitionHolder
public PartitionHolder(PartitionChunk<T> initialChunk)
-
PartitionHolder
public PartitionHolder(List<PartitionChunk<T>> initialChunks)
-
PartitionHolder
protected PartitionHolder(org.apache.druid.timeline.partition.OvershadowableManager<T> overshadowableManager, short maxMinorVersion)
-
-
Method Detail
-
copyWithOnlyVisibleChunks
public static <T extends Overshadowable<T>> PartitionHolder<T> copyWithOnlyVisibleChunks(PartitionHolder<T> partitionHolder)
-
deepCopy
public static <T extends Overshadowable<T>> PartitionHolder<T> deepCopy(PartitionHolder<T> partitionHolder)
-
add
public boolean add(PartitionChunk<T> chunk)
-
getMaxMinorVersion
public short getMaxMinorVersion()
Returns the maximum minor version across all the added segments. We do not handle updates of this variable when segments are removed for the sake of simplicity.
-
remove
@Nullable public PartitionChunk<T> remove(PartitionChunk<T> chunk)
-
isEmpty
public boolean isEmpty()
-
isComplete
public boolean isComplete()
-
getChunk
public PartitionChunk<T> getChunk(int partitionNum)
-
iterator
public Iterator<PartitionChunk<T>> iterator()
- Specified by:
iteratorin interfaceIterable<T extends Overshadowable<T>>
-
getOvershadowed
public List<PartitionChunk<T>> getOvershadowed()
-
hasData
public boolean hasData()
-
-