public class IntegerPartitionChunk<T> extends Object implements PartitionChunk<T>
| Constructor and Description |
|---|
IntegerPartitionChunk(Integer start,
Integer end,
int chunkNumber,
T object) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abuts(PartitionChunk<T> chunk)
Determines if this PartitionChunk abuts another PartitionChunk.
|
int |
compareTo(PartitionChunk<T> chunk) |
boolean |
equals(Object o) |
int |
getChunkNumber()
Returns the partition chunk number of this PartitionChunk.
|
T |
getObject()
Returns the payload, generally an object that can be used to perform some action against the shard.
|
int |
hashCode() |
boolean |
isEnd()
Returns true if this chunk is the end of the partition.
|
boolean |
isStart()
Returns true if this chunk is the beginning of the partition.
|
static <T> IntegerPartitionChunk<T> |
make(Integer start,
Integer end,
int chunkNumber,
T obj) |
String |
toString() |
public static <T> IntegerPartitionChunk<T> make(Integer start, Integer end, int chunkNumber, T obj)
public T getObject()
PartitionChunkgetObject in interface PartitionChunk<T>public boolean abuts(PartitionChunk<T> chunk)
PartitionChunkabuts in interface PartitionChunk<T>chunk - input chunkpublic boolean isStart()
PartitionChunkisStart in interface PartitionChunk<T>public boolean isEnd()
PartitionChunkisEnd in interface PartitionChunk<T>public int getChunkNumber()
PartitionChunkgetChunkNumber in interface PartitionChunk<T>public int compareTo(PartitionChunk<T> chunk)
compareTo in interface Comparable<PartitionChunk<T>>Copyright © 2011–2017. All rights reserved.