Class SingleElementPartitionChunk<T>
- java.lang.Object
-
- org.apache.druid.timeline.partition.SingleElementPartitionChunk<T>
-
- All Implemented Interfaces:
Comparable<PartitionChunk<T>>
,PartitionChunk<T>
@Deprecated public class SingleElementPartitionChunk<T> extends Object implements PartitionChunk<T>
Deprecated.
-
-
Constructor Summary
Constructors Constructor Description SingleElementPartitionChunk(T element)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
abuts(PartitionChunk<T> tPartitionChunk)
Deprecated.Determines if this PartitionChunk abuts another PartitionChunk.int
compareTo(PartitionChunk<T> chunk)
Deprecated.The ordering of PartitionChunks is determined entirely by the partition boundaries and has nothing to do with the object.boolean
equals(Object o)
Deprecated.int
getChunkNumber()
Deprecated.Returns the partition chunk number of this PartitionChunk.T
getObject()
Deprecated.Returns the payload, generally an object that can be used to perform some action against the shard.int
hashCode()
Deprecated.boolean
isEnd()
Deprecated.Returns true if this chunk is the end of the partition.boolean
isStart()
Deprecated.Returns true if this chunk is the beginning of the partition.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
SingleElementPartitionChunk
public SingleElementPartitionChunk(T element)
Deprecated.
-
-
Method Detail
-
getObject
public T getObject()
Deprecated.Description copied from interface:PartitionChunk
Returns the payload, generally an object that can be used to perform some action against the shard.- Specified by:
getObject
in interfacePartitionChunk<T>
- Returns:
- the payload
-
abuts
public boolean abuts(PartitionChunk<T> tPartitionChunk)
Deprecated.Description copied from interface:PartitionChunk
Determines if this PartitionChunk abuts another PartitionChunk. A sequence of abutting PartitionChunks should start with an object where isStart() == true and eventually end with an object where isEnd() == true.- Specified by:
abuts
in interfacePartitionChunk<T>
- Parameters:
tPartitionChunk
- input chunk- Returns:
- true if this chunk abuts the input chunk
-
isStart
public boolean isStart()
Deprecated.Description copied from interface:PartitionChunk
Returns true if this chunk is the beginning of the partition. Most commonly, that means it represents the range [-infinity, X) for some concrete X.- Specified by:
isStart
in interfacePartitionChunk<T>
- Returns:
- true if the chunk is the beginning of the partition
-
isEnd
public boolean isEnd()
Deprecated.Description copied from interface:PartitionChunk
Returns true if this chunk is the end of the partition. Most commonly, that means it represents the range [X, infinity] for some concrete X.- Specified by:
isEnd
in interfacePartitionChunk<T>
- Returns:
- true if the chunk is the end of the partition
-
getChunkNumber
public int getChunkNumber()
Deprecated.Description copied from interface:PartitionChunk
Returns the partition chunk number of this PartitionChunk. I.e. if there are 4 partitions in total and this is the 3rd partition, it will return 2- Specified by:
getChunkNumber
in interfacePartitionChunk<T>
- Returns:
- the sequential numerical id of this partition chunk
-
compareTo
public int compareTo(PartitionChunk<T> chunk)
Deprecated.The ordering of PartitionChunks is determined entirely by the partition boundaries and has nothing to do with the object. Thus, if there are two SingleElementPartitionChunks, they are equal because they both represent the full partition space. SingleElementPartitionChunks are currently defined as less than every other type of PartitionChunk. There is no good reason for it, nor is there a bad reason, that's just the way it is. This is subject to change.- Specified by:
compareTo
in interfaceComparable<T>
- Parameters:
chunk
-- Returns:
-
-