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)
protected
PartitionHolder(org.apache.druid.timeline.partition.OvershadowableManager<T> overshadowableManager)
PartitionHolder(PartitionChunk<T> initialChunk)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(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)
boolean
equals(Object o)
PartitionChunk<T>
getChunk(int partitionNum)
List<PartitionChunk<T>>
getOvershadowed()
boolean
hasData()
int
hashCode()
boolean
isComplete()
boolean
isEmpty()
Iterator<PartitionChunk<T>>
iterator()
Iterable<T>
payloads()
PartitionChunk<T>
remove(PartitionChunk<T> chunk)
String
toString()
-
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)
-
-
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)
-
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:
iterator
in interfaceIterable<T extends Overshadowable<T>>
-
getOvershadowed
public List<PartitionChunk<T>> getOvershadowed()
-
hasData
public boolean hasData()
-
-