public class NumberedPartitionChunk<T> extends Object implements PartitionChunk<T>
| Constructor and Description | 
|---|
NumberedPartitionChunk(int chunkNumber,
                      int chunks,
                      T object)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
abuts(PartitionChunk<T> other)
Determines if this PartitionChunk abuts another PartitionChunk. 
 | 
int | 
compareTo(PartitionChunk<T> other)  | 
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> NumberedPartitionChunk<T> | 
make(int chunkNumber,
    int chunks,
    T obj)  | 
public NumberedPartitionChunk(int chunkNumber,
                              int chunks,
                              T object)
public static <T> NumberedPartitionChunk<T> make(int chunkNumber, int chunks, T obj)
public T getObject()
PartitionChunkgetObject in interface PartitionChunk<T>public boolean abuts(PartitionChunk<T> other)
PartitionChunkabuts in interface PartitionChunk<T>other - 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> other)
compareTo in interface Comparable<PartitionChunk<T>>Copyright © 2011–2018. All rights reserved.